Long live the new QUrl implementation.
authorThiago Macieira <thiago.macieira@intel.com>
Thu, 8 Sep 2011 20:06:17 +0000 (22:06 +0200)
committerQt by Nokia <qt-info@nokia.com>
Thu, 29 Mar 2012 23:19:59 +0000 (01:19 +0200)
commit1372d60bde04a31c8036601076d1093a67c6bd46
tree77aebb9ffe2dd37ec619d484e02a4a04e1bbc033
parent4758c8fa486c07e12e6d0eebfd7b5f8b07b49654
Long live the new QUrl implementation.

Also say hello to QUrl's constructor and QUrl::toString being allowed
again.

QUrl operates now on UTF-16 encoded data, where a Unicode character
matches its UTF-8 percent-encoded form (as per RFC 3987). The data may
exist in different levels of encoding, but it is always in encoded
form (a percent is always "%25"). For that reason, the previously
dangerous methods are no longer dangerous.

The QUrl parser is much more lenient now. Instead of blindly following
the grammar from RFC 3986, we try to use common-sense. Hopefully, this
will also mean the code is faster. It also operates on QStrings and,
for the common case, will not perform any memory allocations it
doesn't keep (i.e., it allocates only for the data that is stored in
QUrlPrivate).

The Null/Empty behaviour that fragments and queries had in Qt4 are now
extended to the scheme, username, password and host parts. This means
QUrl can remember the difference between "http://@example.com" and
"http://example.com".

Missing from this commit:
 - more unit tests, for the new functionality
 - the implementation of the StrictMode parser
 - errorString() support
 - normalisation

Change-Id: I6d340b19c1a11b98a48145152513ffec58fb3fe3
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
src/corelib/io/io.pri
src/corelib/io/qdataurl.cpp
src/corelib/io/qurl.cpp
src/corelib/io/qurl.h
src/corelib/io/qurl_p.h
src/corelib/io/qurlidna.cpp
src/corelib/io/qurlparser.cpp [deleted file]
tests/auto/corelib/io/qurl/tst_qurl.cpp