On Saturday 18 October 2014 02:39:27 Kevin Kofler wrote: > PS: >=20 > I wrote: > > So, Luk=C3=A1=C5=A1 Tinkl answered me on #fedora-kde IRC. For poste= rity: > >=20 > > * Qt 5.4 introduces a new overload: > > http://doc-snapshot.qt-project.org/qt5-5.4/qurl.html#fromUserInpu= t-2 > > with a third parameter that solves this issue. Yep, I added that. > > * This is how Okular solves the problem without hard-depending on Q= t 5.4: > > http://quickgit.kde.org/?p=3Dokular.git&a=3Dcommit&h=3Dd98b4d9200= 37422fe052ffa > > 2633349d41fdbe02e > > Sorry for yet another self-reply, but I'll point out that Okular curr= ently > uses the two-argument form, which according to the documentation is e= nough > when only existing files need to be supported, but I definitely recom= mend > passing the third QUrl::AssumeLocalFile argument. The reason is that = I don't > want Kompare (or most other applications that accept either a file or= a > URL) to do a hostname lookup if it's passed a nonexisting file. I thi= nk it > doesn't make any sense to assume a URL if no http:// is given. It does when you type e.g. konqueror google.com But I agree that for other types of apps it might not. > It sends > mistyped file names out as DNS lookups, which can even be argued to b= e a > security issue. The usual security vs convenience debate.... > I definitely recommend passing the third QUrl::AssumeLocalFile argum= ent Yep, probably makes sense in most apps. --=20 David Faure, faure@kde.org, http://www.davidfaure.fr Working on KDE Frameworks 5