Broken KUrl/KFileDialog, etc
Christian Ehrlicher
Ch.Ehrlicher at gmx.de
Fri Mar 13 18:42:25 CET 2009
Rob Bayer schrieb:
> Hi,
> Does KFileDialog/KUrl seem broken to anyone else? In particular it
> seems to add a / in front of C:/path/to/file so that opening the file
> makes it open /C:/path/to/file and thus fails. At first I thought it
> was just my code but then for kicks I tried compiling the tutorial at
> http://techbase.kde.org/Development/Tutorials/Saving_and_loading and
> get the same error.
>
> I looked through the KUrl source and it looks like the initial / is
> getting added at line 1706 but the comment there says this is
> intentional. Thoughts?
>
You're probably using the wrong function to retrieve the local file.
You've to use KUrl::toLocalFile() and not KUrl::path()
I fixed all places I found but there may be others.
Christian
More information about the Kde-windows
mailing list