aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qsgvisualdatamodel
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2011-05-30 16:35:52 +1000
committerMartin Jones <martin.jones@nokia.com>2011-05-30 16:35:52 +1000
commit16e75d93ebe652f6e5b919aa89809a92881a37e7 (patch)
tree3caee160c2913ceca306abdccc9ae3a82aae9d6d /tests/auto/declarative/qsgvisualdatamodel
parent806f031efeda71d3f4d7d2f949b437493e79cf52 (diff)
Update SG items with recent GV item changes.
Diffstat (limited to 'tests/auto/declarative/qsgvisualdatamodel')
-rw-r--r--tests/auto/declarative/qsgvisualdatamodel/tst_qsgvisualdatamodel.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/declarative/qsgvisualdatamodel/tst_qsgvisualdatamodel.cpp b/tests/auto/declarative/qsgvisualdatamodel/tst_qsgvisualdatamodel.cpp
index ce2c816dd6..078c9976ed 100644
--- a/tests/auto/declarative/qsgvisualdatamodel/tst_qsgvisualdatamodel.cpp
+++ b/tests/auto/declarative/qsgvisualdatamodel/tst_qsgvisualdatamodel.cpp
@@ -203,6 +203,11 @@ void tst_qsgvisualdatamodel::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;
}