[Kde-bindings] branches/work/kdebindings-smoke2/csharp
Aaron J. Seigo
aseigo at kde.org
Tue Feb 19 08:26:16 UTC 2008
On Monday 18 February 2008, Richard Dale wrote:
> On Monday 18 February 2008 22:13:38 Sebastian Sauer wrote:
> > 1. in applet.cpp#132 the line;
> >
> > QString path = KStandardDirs::locate("appdata","plasmoids/" +
> > appletDescription.pluginName() + '/');
> >
> > KStandardDirs::locate does work on files and not on directories. So, it
after testing, i can tell you that you are, thankfully, quite wrong.
in KStandardDirs::exists there is this code:
if (access(QFile::encodeName(fullPath), R_OK) == 0 && KDE_stat(
QFile::encodeName(fullPath), &buff ) == 0)
if (fullPath.at(fullPath.length() - 1) != '/') {
if (S_ISREG( buff.st_mode ))
return true;
} else
if (S_ISDIR( buff.st_mode ))
return true;
it's even in the API docu in one place =)
however, looking at this code in libplasma was not wasted. i realized that it
will only work for plasma the way it is written and not for other
applications (and vice versa, depending on where the plasmoid is stored).
the fix for this should be pretty easy, though; i just have to find a nice
place to register the resource. maybe in Corona.... hm.
--
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43
KDE core developer sponsored by Trolltech
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20080219/d00ad359/attachment.sig>
More information about the Kde-bindings
mailing list