summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-08-16 01:17:56 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-08-16 01:17:56 (GMT)
commitf7c07892e927a6420bb64a7011312f0a4a5a1fc9 (patch)
tree54bf701b991453e9595f984594dae552dd9fb6e4 /tests
parentd904fe2273be5d39b54b987eef6b9cc0d1b85c4b (diff)
downloadQt-f7c07892e927a6420bb64a7011312f0a4a5a1fc9.zip
Qt-f7c07892e927a6420bb64a7011312f0a4a5a1fc9.tar.gz
Qt-f7c07892e927a6420bb64a7011312f0a4a5a1fc9.tar.bz2
emit countChanged where appropriate in Repeater
Task-number: QTBUG-12905 Reviewed-by: Bea Lam
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp
index 623b3d7..360d90f 100644
--- a/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp
+++ b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp
@@ -309,11 +309,14 @@ void tst_QDeclarativeRepeater::dataModel()
QCOMPARE(container->childItems().count(), 4);
+ QSignalSpy repeaterSpy(repeater, SIGNAL(countChanged()));
testModel.addItem("four", "4");
QCOMPARE(container->childItems().count(), 5);
+ QCOMPARE(repeaterSpy.count(),1);
testModel.removeItem(2);
QCOMPARE(container->childItems().count(), 4);
+ QCOMPARE(repeaterSpy.count(),2);
// Check that model changes are propagated
QDeclarativeText *text = findItem<QDeclarativeText>(canvas->rootObject(), "myName", 1);