diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-03-30 17:48:42 -0300 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-11 23:32:26 +0200 |
commit | 1b7e9dba75f18342911bc6954be3e754322f091f (patch) | |
tree | 1dfb775910294ff8d02e60cfa9c2bf178baa6221 /src/testlib/qtest.h | |
parent | 997ac954abe8e4f7d9323f13a79989f277de8301 (diff) |
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>
Diffstat (limited to 'src/testlib/qtest.h')
-rw-r--r-- | src/testlib/qtest.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/testlib/qtest.h b/src/testlib/qtest.h index d5d30d9003..392e223e39 100644 --- a/src/testlib/qtest.h +++ b/src/testlib/qtest.h @@ -142,7 +142,7 @@ template<> inline char *toString(const QRectF &s) template<> inline char *toString(const QUrl &uri) { - return qstrdup(uri.toEncoded(QUrl::DecodeDelimiters).constData()); + return qstrdup(uri.toEncoded().constData()); } template<> inline char *toString(const QVariant &v) |