summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDavid Faure <faure@kde.org>2012-05-14 14:48:23 +0200
committerQt by Nokia <qt-info@nokia.com>2012-05-14 17:36:50 +0200
commitfeb212e1e5f64111ed061b474bb2e6b8c3886acb (patch)
treead4ad6d9f51f337de8316a15e94cc2534ce8c946 /tests
parent28aa3324de22fa6bdbbed2fd5536fadf761666dc (diff)
QUrl: a url with a fragment or query, and one without, are different.
Fix operator== and operator< so that a URL with an empty fragment or query, is not treated as equal to a URL without any fragment or query. This restores the Qt4 behavior on this particular issue. Change-Id: Ie989f37353fb13c791b1d558d638d2e8a5b5d1b8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/io/qurl/tst_qurl.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/corelib/io/qurl/tst_qurl.cpp b/tests/auto/corelib/io/qurl/tst_qurl.cpp
index 38b9dc3198..48ff34ad56 100644
--- a/tests/auto/corelib/io/qurl/tst_qurl.cpp
+++ b/tests/auto/corelib/io/qurl/tst_qurl.cpp
@@ -307,6 +307,8 @@ void tst_QUrl::comparison2_data()
QTest::newRow("scheme-null") << QUrl("x:") << QUrl() << 1;
QTest::newRow("samescheme") << QUrl("x:") << QUrl("x:") << 0;
+ QTest::newRow("no-fragment-empty-fragment") << QUrl("http://kde.org/dir/") << QUrl("http://kde.org/dir/#") << -1;
+ QTest::newRow("no-query-empty-query") << QUrl("http://kde.org/dir/") << QUrl("http://kde.org/dir/?") << -1;
// the following three are by choice
// the order could be the opposite and it would still be correct