diff options
author | David Faure <faure@kde.org> | 2012-07-21 08:54:08 (GMT) |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-22 14:51:19 (GMT) |
commit | d1ff987835c459513dbce0c48fc40c6cdcbe1134 (patch) | |
tree | cb3b669054fa7a7cc147b05521eba7d8282427c8 /tests/auto | |
parent | 8a87476673662be0f9fc5a0f0485b5e6fb951a5a (diff) | |
download | Qt-d1ff987835c459513dbce0c48fc40c6cdcbe1134.zip Qt-d1ff987835c459513dbce0c48fc40c6cdcbe1134.tar.gz Qt-d1ff987835c459513dbce0c48fc40c6cdcbe1134.tar.bz2 |
QUrl: add missing detach() in setEncodedUrl, spotted by Marc Mutz.
Reported-by: Marc Mutz <marc.mutz@kdab.com>
Change-Id: If53957bafa9c077981c8ec5107313bc25469b579
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qurl/tst_qurl.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/qurl/tst_qurl.cpp b/tests/auto/qurl/tst_qurl.cpp index 7a6713f..707174d 100644 --- a/tests/auto/qurl/tst_qurl.cpp +++ b/tests/auto/qurl/tst_qurl.cpp @@ -2690,6 +2690,12 @@ void tst_QUrl::tolerantParser() url.setEncodedUrl("data:text/css,div%20{%20border-right:%20solid;%20}"); QCOMPARE(url.toEncoded(), QByteArray("data:text/css,div%20%7B%20border-right:%20solid;%20%7D")); + + QUrl url2 = url; + url2.setEncodedUrl("http://www.example.com"); + // Check that it detached + QCOMPARE(url.toEncoded(), QByteArray("data:text/css,div%20%7B%20border-right:%20solid;%20%7D")); + QCOMPARE(url2.toEncoded(), QByteArray("http://www.example.com")); } { |