KStandardDirs behaviour when finding directories

Stephan Kulow coolo at kde.org
Mon Jul 30 13:04:24 BST 2007


Am Montag 30 Juli 2007 schrieb Dmitry Suzdalev:
> Hi!
>
> While searching for bug which prevented loading styles in Kopete I
> found the following issue.
>
> Suppose I want to find a directory with KStandardDirs. If I write it like
> this:
>
> QString path = KStandardDirs::locate("appdata", "SomeDir");
>
> then it returns an empty path even though
> ~/.kde/share/apps/myapp/SomeDir exists.
> It finds this path only when I write:
>
> QString path = KStandardDirs::locate("appdata", "SomeDir/");
>
> i.e. with slash appended.
>
> So is this a bug or a feature?
> If this is a feature then it should be documented somewhere in
> KStandardDirs apidox.
I can find only "file" everywhere in KStandardDirs apidox. So what in the 
apidox makes you think it also works for directories? We can change that

Greetings, Stephan




More information about the kde-core-devel mailing list