From 1b7e9dba75f18342911bc6954be3e754322f091f Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 30 Mar 2012 17:48:42 -0300 Subject: 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 --- src/testlib/qtest.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/testlib') 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) -- cgit v1.2.3