Long live QUrlQuery
authorThiago Macieira <thiago.macieira@intel.com>
Sat, 3 Sep 2011 13:05:56 +0000 (15:05 +0200)
committerQt by Nokia <qt-info@nokia.com>
Thu, 29 Mar 2012 23:19:59 +0000 (01:19 +0200)
commit1aeb18038661d8da6d37fa278e37e315e35c5c42
treea0d84714d56e45c42e6cdd0fde686ba18e91de4a
parentb75aa795feb476111a0706c52a8ebea8dff7640d
Long live QUrlQuery

This class is meant to replace the QUrl functionality that handled
key-value pairs in the query part of an URL. We therefore split the
URL parsing code from the code dealing with the pairs: QUrl now only
needs to deal with one encoded string, without knowing what it is.

Since it doesn't know how to decode the query, QUrl also becomes
limited in what it can decode. Following the letter of the RFC,
queries will not encode "gen-delims" nor "sub-delims" nor the plus
sign (+), thus allowing the most common delimiters options to remain
unchanged.

QUrlQuery has some undefined behaviour when it comes to empty query
keys. It may drop them or keep them; it may merge them, etc.

Change-Id: Ia61096fe5060b486196ffb8532e7494eff58fec1
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
doc/src/snippets/code/src_corelib_io_qurl.cpp
src/corelib/io/io.pri
src/corelib/io/qurlquery.cpp [new file with mode: 0644]
src/corelib/io/qurlquery.h [new file with mode: 0644]
tests/auto/corelib/io/qurlquery/qurlquery.pro [new file with mode: 0644]
tests/auto/corelib/io/qurlquery/tst_qurlquery.cpp [new file with mode: 0644]