diff options
author | David Faure <faure@kde.org> | 2012-01-26 01:57:59 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-28 13:08:50 +0100 |
commit | 27d9fef14acdc33126004f4de3047d3344448a7d (patch) | |
tree | 8b43ea19d22ecc424ebe2ae8176dbd5a426762ee /tests | |
parent | e650dd3b6d8212d2c54ddb4a50558b508d0bf2b9 (diff) |
QUrl: deprecate setEncodedUrl() and fromEncoded(), add url().
setEncodedUrl() isn't necessary anymore now that setUrl can handle
encoded (and partially encoded) urls.
url() is added for symmetry with setUrl().
Change-Id: I4e671482a5635a86797421ca50882db9cd60d852
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/corelib/io/qurl/tst_qurl.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/auto/corelib/io/qurl/tst_qurl.cpp b/tests/auto/corelib/io/qurl/tst_qurl.cpp index 053a1d214c..82f16f10f7 100644 --- a/tests/auto/corelib/io/qurl/tst_qurl.cpp +++ b/tests/auto/corelib/io/qurl/tst_qurl.cpp @@ -524,13 +524,11 @@ void tst_QUrl::setUrl() } { - QUrl notPretty; - notPretty.setEncodedUrl("http://ferret.lmh.ox.ac.uk/%7Ekdecvs/"); + QUrl notPretty("http://ferret.lmh.ox.ac.uk/%7Ekdecvs/"); QVERIFY(notPretty.isValid()); QCOMPARE(notPretty.toString(), QString::fromLatin1("http://ferret.lmh.ox.ac.uk/~kdecvs/")); - QUrl notPretty2; - notPretty2.setEncodedUrl("file:/home/test/directory%20with%20spaces"); + QUrl notPretty2("file:/home/test/directory%20with%20spaces"); QVERIFY(notPretty2.isValid()); QCOMPARE(notPretty2.toString(), QString::fromLatin1("file:///home/test/directory with spaces")); @@ -557,8 +555,7 @@ void tst_QUrl::setUrl() charles.setPath("/home/charles/foo%20moo"); QCOMPARE(charles.path(), QString::fromLatin1("/home/charles/foo%20moo")); - QUrl charles2; - charles2.setEncodedUrl("file:/home/charles/foo%20moo"); + QUrl charles2("file:/home/charles/foo%20moo"); QCOMPARE(charles2.path(), QString::fromLatin1("/home/charles/foo moo")); } @@ -622,8 +619,7 @@ void tst_QUrl::setUrl() } { - QUrl url; - url.setEncodedUrl("data:text/javascript,d5%20%3D%20'five\\u0027s'%3B"); + QUrl url("data:text/javascript,d5%20%3D%20'five\\u0027s'%3B"); QVERIFY(url.isValid()); QCOMPARE(url.scheme(), QString("data")); QCOMPARE(url.host(), QString()); |