Allow {} to remain decoded in URLs in the path and query
authorThiago Macieira <thiago.macieira@intel.com>
Fri, 30 Mar 2012 19:21:45 +0000 (16:21 -0300)
committerQt by Nokia <qt-info@nokia.com>
Wed, 11 Apr 2012 21:32:18 +0000 (23:32 +0200)
commit997ac954abe8e4f7d9323f13a79989f277de8301
treebcbeefb06a533d68d59e38bb68a63d7f7f915f15
parenta01c662d3737fd9f26a7e4455d7bcb03628155d7
Allow {} to remain decoded in URLs in the path and query

This allows things like http://example.com/{1234-5678}?id={abcd-ef01}.
But do not allow it in other parts of the URL. I could allow it in the
fragment, but in the username and password it would be too ugly.

In order to do that, make DecodeReserved use two bits and have
PrettyDecoded set only one of them. That way, toString(PrettyDecoded)
can be distinguished from toString(PrettyDecoded | DecodeReserved),
just as path(PrettyDecoded) can be distinguished from
path(PrettyDecoded & ~DecodeDelimiters).

Also, take the opportunity to avoid decoding the reserved characters
in the query. Keep them encoded as they should be.

Change-Id: I1604a0c8015c6b03dc2fbf49ea9d1dbed96fc186
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
src/corelib/io/qurl.cpp
src/corelib/io/qurl.h
tests/auto/corelib/io/qurl/tst_qurl.cpp