summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2011-01-06 13:51:04 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2011-01-06 14:00:50 (GMT)
commit91596c9c08208690894ec11a3a99eac57ad17f2b (patch)
treec63a555b2103f3f3732e3aac3bfa59f7c0ce15a9 /tests/auto
parent5c3010cf467d437ccfc8a263bed167e979614504 (diff)
downloadQt-91596c9c08208690894ec11a3a99eac57ad17f2b.zip
Qt-91596c9c08208690894ec11a3a99eac57ad17f2b.tar.gz
Qt-91596c9c08208690894ec11a3a99eac57ad17f2b.tar.bz2
QUrl::setUrl should call detach
Task-number: QTBUG-16425 Reviewed-by: Gabriel Reviewed-by: Markus Goetz
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qurl/tst_qurl.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/qurl/tst_qurl.cpp b/tests/auto/qurl/tst_qurl.cpp
index 63f9721..4354ffb 100644
--- a/tests/auto/qurl/tst_qurl.cpp
+++ b/tests/auto/qurl/tst_qurl.cpp
@@ -675,6 +675,14 @@ void tst_QUrl::setUrl()
QCOMPARE(url.encodedPath().constData(), "text/javascript,d5%20%3D%20'five%5Cu0027s'%3B");
}
+ { //check it calls detach
+ QUrl u1("http://aaa.com");
+ QUrl u2 = u1;
+ u2.setUrl("http://bbb.com");
+ QCOMPARE(u1.host(), QString::fromLatin1("aaa.com"));
+ QCOMPARE(u2.host(), QString::fromLatin1("bbb.com"));
+ }
+
/*
The tests below are copied from kdelibs/kdecore/tests/kurltest.cpp (an old version of)