diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-04-27 19:39:10 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-04-27 19:39:10 (GMT) |
commit | ce4996b624678f37b13fbb7db810cccd8970a889 (patch) | |
tree | f8ba52c4160e393a78e68b381f1b9ae5bb9d34b0 /tests | |
parent | 63e89c45fcc07759c928231ac27cc25928116d45 (diff) | |
parent | f6b7ce204ee88be0fedb4cfcff382f208fa4ed33 (diff) | |
download | Qt-ce4996b624678f37b13fbb7db810cccd8970a889.zip Qt-ce4996b624678f37b13fbb7db810cccd8970a889.tar.gz Qt-ce4996b624678f37b13fbb7db810cccd8970a889.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml:
Clear the root index when the model is reset.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp | 5 |
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; } |