summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-01-07 09:32:33 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-01-07 09:33:33 (GMT)
commit089ee7094eabb2058b478f5d2f306a69f6c0b3bf (patch)
tree9e3e2dae82196e99cbc89860a33e086018cd9283 /tests
parent51f92c1a4f66f658b3c3b7f034bb8dd661a0d57d (diff)
downloadQt-089ee7094eabb2058b478f5d2f306a69f6c0b3bf.zip
Qt-089ee7094eabb2058b478f5d2f306a69f6c0b3bf.tar.gz
Qt-089ee7094eabb2058b478f5d2f306a69f6c0b3bf.tar.bz2
Make an empty QUrl also be considered non-detached (d == 0).
Reviewed-by: Trust Me
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qurl/tst_qurl.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/auto/qurl/tst_qurl.cpp b/tests/auto/qurl/tst_qurl.cpp
index 33812fe..ecd6f09 100644
--- a/tests/auto/qurl/tst_qurl.cpp
+++ b/tests/auto/qurl/tst_qurl.cpp
@@ -90,6 +90,7 @@ public slots:
private slots:
void getSetCheck();
void constructing();
+ void isDetached();
void assignment();
void comparison();
void copying();
@@ -318,6 +319,25 @@ void tst_QUrl::constructing()
QVERIFY(!buildUNC.isEmpty());
}
+void tst_QUrl::isDetached()
+{
+ QUrl url;
+ QVERIFY(!url.isDetached());
+
+ url = "http://qt.nokia.com/";
+ QVERIFY(url.isDetached());
+
+ url.clear();
+ QVERIFY(!url.isDetached());
+
+ url.setHost("qt.nokia.com");
+ QVERIFY(url.isDetached());
+
+ QUrl url2 = url;
+ QVERIFY(!url.isDetached());
+ QVERIFY(!url2.isDetached());
+}
+
void tst_QUrl::assignment()
{
QUrl url("http://qt.nokia.com/");