[Development] URL: who needs DecodeUnambiguousDelimiters?
Thiago Macieira
thiago.macieira at intel.com
Fri Mar 30 05:15:19 CEST 2012
Suppose the URL:
file:///hash(%23)in path: ☺
which, after re-jigging, has:
path() == "/hash(#)in path: ☺";
and
path(QUrl::FullyEncoded) == "/hash(%23)in%20path:%20%E2%98%BA";
Question: can anyone come up with a valid use-case for
path(something here) == "/hash(%23)in path: ☺" ?
That is, obtain exactly what appears in the URL when toString() is called?
Note that you can obtain that by running:
toString(QUrl::RemoveAuthority | QUrl::RemoveScheme |
QUrl::RemoveQuery | QUrl::RemoveFragment);
The above trick works for all components, except the username and password --
the hostname cannot be removed without removing them as well.[1]
With that in mind, unless someone objects, I'm going to merge the
DecodeUnambiguousDelimiters and DecodeAllDelimiters into one enum only --
DecodeDelimiters.
[1] the enum already has the reserved bits for RemoveHost and RemoveUserName
and has had them since Qt 4.0. We could add them later.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
Intel Sweden AB - Registration Number: 556189-6027
Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120330/eeb9fad4/attachment.sig>
More information about the Development
mailing list