From kde-core-devel Tue Feb 24 20:27:12 2009 From: Thiago Macieira Date: Tue, 24 Feb 2009 20:27:12 +0000 To: kde-core-devel Subject: Re: KUrl::path() <-> KUrl::toLocalFile() Message-Id: <200902242127.22769.thiago () kde ! org> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=123550729120429 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--nextPart11363577.IboYdPR5pf" --nextPart11363577.IboYdPR5pf Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Christian Ehrlicher wrote: >Hi, > >While on Linux QUrl::path() =3D=3D QUrl::toLocalFile(), this is not true f= or >windows. To work around this, a wrong hack was added to KUrl::path() to >also return a local file. >I removed this hack and have to change a lot of places from KUrl::path() >to KUrl::toLocalFile(). Now my question is if there're some >disadvantages in using KUrl::toLocalFile() which I've to remember. toLocalFile() is the right thing, because it returns empty if the URL is=20 not a local file. Using path() will lead to subtle mistakes like: http://localhost/index.html -> /index.html toLocalFile() also creates UNC pathnames, which path() won't do. =2D-=20 Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org PGP/GPG: 0x6EF45358; fingerprint: E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358 --nextPart11363577.IboYdPR5pf Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iD8DBQBJpFghM/XwBW70U1gRAjtJAJ0fEoj0RefNA+ayKHBOn4ekeChwygCgpla3 UJlvSK+fmAkHTtRsXL7KOTI= =RLNO -----END PGP SIGNATURE----- --nextPart11363577.IboYdPR5pf--