From kde-edu-devel Sun Apr 29 19:51:04 2012 From: David Faure Date: Sun, 29 Apr 2012 19:51:04 +0000 To: kde-edu-devel Subject: Re: Pairs going to KDE Edu Message-Id: <1351465.5TOVmqWEZZ () asterix ! site> X-MARC-Message: https://marc.info/?l=kde-edu-devel&m=133572967611407 On Thursday 19 April 2012 23:32:51 Aleix Pol wrote: > On Thu, Apr 19, 2012 at 4:45 PM, Andrius da Costa Ribas > > wrote: > > Hello, > > > > Please find attached suggested patches to fix/improve Windows build. The URL handling code was broken indeed, but the suggested fix is still a bit buggy. Don't use QUrl::toString in Qt4, it will fail when a filename contains a '#'. Use KUrl::url() instead. This issue is fixed in Qt5. QString PlayersModel::iconsDir(const QString& path) { - return "file://"+KGlobal::dirs()->findResource("appdata", path); + return QUrl::fromLocalFile(KGlobal::dirs()->findResource("appdata", path)).toString(); } This method should really return a KUrl, rather than an ambiguous QString (is it a path? is it a URL?) (obviously the implementation returns a URL, but who knows what the callers do...) -- David Faure, faure@kde.org, http://www.davidfaure.fr Sponsored by Nokia to work on KDE, incl. KDE Frameworks 5 _______________________________________________ kde-edu mailing list kde-edu@mail.kde.org https://mail.kde.org/mailman/listinfo/kde-edu