summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativelistmodel
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-10-15 09:05:43 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-10-15 09:11:31 (GMT)
commit3ef69b12f6d6905594ef3976b3e16787378dfe6a (patch)
tree1105fb45cddf0afca5929041e679e743e36a1772 /tests/auto/declarative/qdeclarativelistmodel
parent1745a0e7799774373ad6252a73d6e8af841db2a1 (diff)
parent9358d77fc1de64d2a8a06bfa4095dcde9f9b009b (diff)
downloadQt-3ef69b12f6d6905594ef3976b3e16787378dfe6a.zip
Qt-3ef69b12f6d6905594ef3976b3e16787378dfe6a.tar.gz
Qt-3ef69b12f6d6905594ef3976b3e16787378dfe6a.tar.bz2
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Conflicts: src/gui/painting/qpaintengine_raster.cpp tests/auto/declarative/qdeclarativetext/data/alignments_cb.png tests/auto/declarative/qdeclarativetext/data/alignments_cc.png tests/auto/declarative/qdeclarativetext/data/alignments_ct.png
Diffstat (limited to 'tests/auto/declarative/qdeclarativelistmodel')
-rw-r--r--tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
index be77f8e..4b8d772 100644
--- a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
+++ b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
@@ -320,11 +320,16 @@ void tst_qdeclarativelistmodel::dynamic()
if (!warning.isEmpty())
QTest::ignoreMessage(QtWarningMsg, warning.toLatin1());
+ QSignalSpy spyCount(&model, SIGNAL(countChanged()));
+
int actual = e.evaluate().toInt();
if (e.hasError())
qDebug() << e.error(); // errors not expected
QCOMPARE(actual,result);
+
+ if (model.count() > 0)
+ QVERIFY(spyCount.count() > 0);
}
void tst_qdeclarativelistmodel::dynamic_worker_data()
@@ -351,6 +356,8 @@ void tst_qdeclarativelistmodel::dynamic_worker()
QDeclarativeItem *item = createWorkerTest(&eng, &component, &model);
QVERIFY(item != 0);
+ QSignalSpy spyCount(&model, SIGNAL(countChanged()));
+
if (script[0] == QLatin1Char('{') && script[script.length()-1] == QLatin1Char('}'))
script = script.mid(1, script.length() - 2);
QVariantList operations;
@@ -367,6 +374,9 @@ void tst_qdeclarativelistmodel::dynamic_worker()
waitForWorker(item);
QCOMPARE(QDeclarativeProperty(item, "result").read().toInt(), result);
+ if (model.count() > 0)
+ QVERIFY(spyCount.count() > 0);
+
delete item;
qApp->processEvents();
}