Patch: Port KDESRCDIR to QFINDTESTDATA.
David Faure
faure+bluesystems at kde.org
Wed Feb 20 11:07:08 UTC 2013
On Wednesday 20 February 2013 00:21:57 Jignesh Kakadiya wrote:
> Hi David,
>
> I am able to port all the KDESRCDIR instances to QFINDTESDATA. Compiled and
> tested. Please review.
Good job.
The only thing I don't like is the .toAscii(), which is wrong in case paths contain
non-ascii characters. This should be QFile::encodeName(theQString) instead.
(Look for toAscii() in the whole patch, you have more than one)
In kdiroperatortest.cpp you could have split the line in two :-)
> const QUrl kFileDirUrl(QUrlPathInfo(QUrl::fromLocalFile(QFileInfo(QFINDTESTDATA("kdiroperatortest.cpp")).absolutePath())).directoryUrl());
That's huge :)
Make a QString variable with the directory in it, and keep the url stuff on the 2nd line?
Everything else looks good, feel free to commit after fixing these two issues.
--
David Faure, faure at kde.org, http://www.davidfaure.fr
Sponsored by BlueSystems and KDAB to work on KDE Frameworks
More information about the Kde-frameworks-devel
mailing list