summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-08-11 02:45:12 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-08-11 02:45:12 (GMT)
commitcc2fe3a5e2a748a8284ee732befc6a25d193f0c0 (patch)
tree257e79d10969c04c2c460246ad68e2326be135e6 /tests/auto
parentc7a18308a2725e4d1763777cb549f1ae74848005 (diff)
parentc170e75cd3af746cfec80ff7d5feb44228a329c3 (diff)
downloadQt-cc2fe3a5e2a748a8284ee732befc6a25d193f0c0.zip
Qt-cc2fe3a5e2a748a8284ee732befc6a25d193f0c0.tar.gz
Qt-cc2fe3a5e2a748a8284ee732befc6a25d193f0c0.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: Don't destroy ListModel child list nodes.
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
index 858c26d..10805b4 100644
--- a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
+++ b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
@@ -271,6 +271,9 @@ void tst_qdeclarativelistmodel::dynamic_data()
QTest::newRow("nested-insert") << "{append({'foo':123});insert(0,{'bars':[{'a':1},{'b':2},{'c':3}]});get(0).bars.get(0).a}" << 1 << "";
QTest::newRow("nested-set") << "{append({'foo':123});set(0,{'foo':[{'x':123}]});get(0).foo.get(0).x}" << 123 << "";
+ QTest::newRow("nested-count") << "{append({'foo':123,'bars':[{'a':1},{'a':2},{'a':3}]}); get(0).bars.count}" << 3 << "";
+ QTest::newRow("nested-clear") << "{append({'foo':123,'bars':[{'a':1},{'a':2},{'a':3}]}); get(0).bars.clear(); get(0).bars.count}" << 0 << "";
+
// XXX
//QTest::newRow("nested-setprop") << "{append({'foo':123});setProperty(0,'foo',[{'x':123}]);get(0).foo.get(0).x}" << 123 << "";
}
@@ -344,9 +347,7 @@ void tst_qdeclarativelistmodel::dynamic_worker()
waitForWorker(item);
QDeclarativeExpression e(eng.rootContext(), &model, operations.last().toString());
- if (QByteArray(QTest::currentDataTag()).startsWith("nested"))
- QVERIFY(e.evaluate().toInt() != result);
- else
+ if (!QByteArray(QTest::currentDataTag()).startsWith("nested"))
QCOMPARE(e.evaluate().toInt(), result);
}