qt5base-lts/tests/auto/corelib/io/qurl
Thiago Macieira f89fd779fc Overhaul a little the QUrl error reporting.
Keep the original QString that triggered the parsing error, instead of
just one QChar. This provides more powerful error messages, like:

 Invalid IPv6 address; source was "http://[:::]";  scheme = "http", host = ""
 (QUrl cannot keep invalid hostnames)

 Invalid port or port number out of range; source was "http://example.com:abc";  scheme = "http", host = "example.com"
 (QUrl cannot keep a non-numeric port number)

 Invalid path (character '%' not permitted); source was "foo:/path%?";  scheme = "foo", path = "/path%25%1F"
 (the tolerant parser runs first, so the faulty component is fixed)

This stores the error state in a special structure which is not
allocated under normal conditions, keeping the memory consumption
down. On 32-bit systems, QUrlPrivate does not increase in size; on
64-bit systems, it grows by 8 bytes.

Change-Id: I93d798d43401dfeb9fca7b6eed7ea758da10136b
Reviewed-by: David Faure <faure@kde.org>
2012-10-02 22:34:42 +02:00
..
.gitignore Moving relevant tests to corelib/io 2011-08-31 10:08:38 +02:00
idna-test.c Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qurl.pro QUrl: port thread-safety autotest from Qt4. 2012-08-26 11:08:42 +02:00
tst_qurl.cpp Overhaul a little the QUrl error reporting. 2012-10-02 22:34:42 +02:00