summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativevisualdatamodel
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-04-28 16:09:05 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-04-28 16:09:05 (GMT)
commit223821eb07c1243a0bcd3741fe09516807eb1b00 (patch)
treee4c749e30f2c9762cb690573106b9af2b2886838 /tests/auto/declarative/qdeclarativevisualdatamodel
parent5159920a3bd2ab75035fd130a3b840cd856021bd (diff)
parentce4996b624678f37b13fbb7db810cccd8970a889 (diff)
downloadQt-223821eb07c1243a0bcd3741fe09516807eb1b00.zip
Qt-223821eb07c1243a0bcd3741fe09516807eb1b00.tar.gz
Qt-223821eb07c1243a0bcd3741fe09516807eb1b00.tar.bz2
Merge branch 4.7 into qt-4.8-from-4.7
Diffstat (limited to 'tests/auto/declarative/qdeclarativevisualdatamodel')
-rw-r--r--tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp b/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp
index 85d7876..7b384f8 100644
--- a/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp
+++ b/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp
@@ -190,6 +190,11 @@ void tst_qdeclarativevisualdatamodel::rootIndex()
QMetaObject::invokeMethod(obj, "setRootToParent");
QVERIFY(qvariant_cast<QModelIndex>(obj->rootIndex()) == QModelIndex());
+ QMetaObject::invokeMethod(obj, "setRoot");
+ QVERIFY(qvariant_cast<QModelIndex>(obj->rootIndex()) == model.index(0,0));
+ model.clear(); // will emit modelReset()
+ QVERIFY(qvariant_cast<QModelIndex>(obj->rootIndex()) == QModelIndex());
+
delete obj;
}