diff options
| author | Thiago Macieira <[email protected]> | 2012-09-20 17:22:01 +0200 |
|---|---|---|
| committer | The Qt Project <[email protected]> | 2012-10-02 22:34:42 +0200 |
| commit | f89fd779fc4431f667d937ea502fd930e6425079 (patch) | |
| tree | 2668e07f1471c9c03b6e9f4348767003ed1cffaf /src/gui/kernel/qplatformopenglcontext.cpp | |
| parent | 4f52a9509995b1f5c834354ff6d02fa9b4f4396d (diff) | |
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 <[email protected]>
Diffstat (limited to 'src/gui/kernel/qplatformopenglcontext.cpp')
0 files changed, 0 insertions, 0 deletions
