KStandardDirs behaviour when finding directories

Allen Winter winter at kde.org
Mon Jul 30 17:08:47 BST 2007


On Monday 30 July 2007 11:48:59 am Martin Koller wrote:
> On Monday 30 July 2007, Dmitry Suzdalev wrote:
> 
> > 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.
> > But honestly I would expect the first version to work :)
> 
> I stumbled over the same problem but from the users side, as in korganizer one 
> can enter a directory for a resource.
> See my mail in the archive from 2004(!), which was silently ignored...
>  http://lists.kde.org/?l=kde-core-devel&m=109922377513277&w=2
> 

Why not use the QDir and QFileInfo classes to help here?
For example, use QFIleInfo::IsDir()  to determine if a directory?





More information about the kde-core-devel mailing list