Change the component formatting enum values so the default is zero
authorThiago Macieira <thiago.macieira@intel.com>
Fri, 30 Mar 2012 20:48:42 +0000 (17:48 -0300)
committerQt by Nokia <qt-info@nokia.com>
Wed, 11 Apr 2012 21:32:26 +0000 (23:32 +0200)
commit1b7e9dba75f18342911bc6954be3e754322f091f
tree1dfb775910294ff8d02e60cfa9c2bf178baa6221
parent997ac954abe8e4f7d9323f13a79989f277de8301
Change the component formatting enum values so the default is zero

By having the default value equal to zero, we follow the principle of
least surprise. For example, if we had
      url.path()
and we refactored to
      url.path(QUrl::DecodeSpaces)

Then instead of ensuring spaces are decoded, we make spaces the only
thing encoded (unicode, delimiters and reserved characters are
encoded).

Besides, modifying the default can only be used to encode something
that wasn't encoded previously, so having the enums as Encode makes
more sense.

As a side-effect, toEncoded() does not support any extra encoding
options.

Change-Id: I2624ec446e65c2d979e9ca2f81bd3db22b00bb13
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
src/corelib/io/qurl.cpp
src/corelib/io/qurl.h
src/corelib/io/qurlquery.cpp
src/corelib/io/qurlrecode.cpp
src/testlib/qtest.h
tests/auto/corelib/io/qurl/tst_qurl.cpp
tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp
tests/auto/corelib/io/qurlquery/tst_qurlquery.cpp