diff options
author | David Faure <faure@kde.org> | 2012-01-24 14:51:51 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-24 15:27:08 +0100 |
commit | 84bdb7b61f79402b238e903fc18fd62e565e1563 (patch) | |
tree | 06652ad1d26b146c1221427c2661ac174935b7d8 /tests | |
parent | 0e06e47a0b37c3741a9501980e743530aab538d0 (diff) |
Make QUrl always lowercase the scheme().
URL schemes can only contain alphanumeric characters and all
protocols specify that they are case-insensitive. So instead
of doing case-insensitive comparison everywhere and then get
it wrong sometimes, better to lower-case it here.
Change-Id: I61f51a3f4c85b90af1586ebcf69608987fbe2ec3
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/corelib/io/qurl/tst_qurl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/corelib/io/qurl/tst_qurl.cpp b/tests/auto/corelib/io/qurl/tst_qurl.cpp index f9dcb84fa8..2f53367061 100644 --- a/tests/auto/corelib/io/qurl/tst_qurl.cpp +++ b/tests/auto/corelib/io/qurl/tst_qurl.cpp @@ -375,7 +375,7 @@ void tst_QUrl::setUrl() { QUrl url("hTTp://www.foo.bar:80"); QVERIFY(url.isValid()); - QCOMPARE(url.scheme(), QString::fromLatin1("hTTp")); + QCOMPARE(url.scheme(), QString::fromLatin1("http")); QCOMPARE(url.path(), QString()); QVERIFY(url.encodedQuery().isEmpty()); QVERIFY(url.userInfo().isEmpty()); @@ -385,7 +385,7 @@ void tst_QUrl::setUrl() QCOMPARE(url.port(), 80); QUrl url2("//www1.foo.bar"); - QCOMPARE(url.resolved(url2).toString(), QString::fromLatin1("hTTp://www1.foo.bar")); + QCOMPARE(url.resolved(url2).toString(), QString::fromLatin1("http://www1.foo.bar")); } { |