|
|
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
_______________________________________________
Kde-bindings mailing list
Kde-bindings@xxxxxxx
https://mail.kde.org/mailman/listinfo/kde-bindings
|
|