OSX/CI: kio placed files erroneously due to missing required backslash in path
David Faure
faure at kde.org
Sun Dec 28 22:22:11 UTC 2014
On Sunday 28 December 2014 22:54:51 Frank Reininghaus wrote:
> Hi,
>
> 2014-12-23 9:44 GMT+01:00 David Faure:
> > On Tuesday 23 December 2014 00:59:56 Marko Käning wrote:
> >> Fixed in
> >>
> >> http://commits.kde.org/kio/c5522b6931908d3fd8ad97555a3edf2a3e859b50
> >>
> >> Ooops, should I have pushed this through Gerrit before committing?
> >
> > Nope, that's fine, trivial fix. Thanks!
>
> Wouldn't it be better to use QDir::separator() though, in order to
> make sure that it works on non-Unix operating systems?
This seems to be a very common misconception....
All of the Qt API works fine with forward slashes.
The Windows file-engine in Qt takes care of converting if necessary for the
underlying native calls, but Qt encapsulates all of that for us, in order to
make application development much easier.
You only need to use QDir::separator() .... well, never, mostly ;)
If you want to display a path to the user you can use
QDir::toNativeSeparators() and when reading a path from the user you can use
QDir::fromNativeSeparators().
Anyway, in this commit we're not talking about user-visible stuff, so '/' is
perfectly fine.
--
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5
More information about the Kde-frameworks-devel
mailing list