KGlobalSettings::documentPath returns empty string?

Andreas Pakulat apaku at gmx.de
Thu Aug 7 15:59:22 BST 2008


On 07.08.08 16:31:33, Thiago Macieira wrote:
> On Thursday 07 August 2008 16:05:03 Andreas Pakulat wrote:
> > Hi,
> >
> > I have no idea what the xdg spec says, but documentPath returns an empty
> > string now when $HOME/Documents doesn't exist and one doesn't use the
> > user-dirs.dir file. (KGS now uses QDesktopServices::storageLocation
> > which does an existence check before returning the default of
> > $HOME/Documents)
> >
> > I'm wondering wether that is intentional, as this just triggered a bug
> > in kdelibs (see my recent commit to kfile/) or something I should file
> > to TT and put a workaround into KGS
> 
> We'll add support for Documents into Qt 4.5. In the mean time, KDE code should 
> handle the empty string and apply its own default value.

I probably should've changed the subject. The problem is not that
"Documents" is not supported in Qt (it actually is - at least for X11),
the problem is that Qt checks for the existence of the paths and if it
doesn't exist returns an empty string.

So the question really is: Is that the correct behaviour for KDE? Or
should we always return a proper path, no matter wether the folder
exists or not. - which would basically mean copying Qt's code into KGS.

Andreas

-- 
Generosity and perfection are your everlasting goals.




More information about the kde-core-devel mailing list