diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-08-16 01:17:56 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-08-16 01:17:56 (GMT) |
commit | f7c07892e927a6420bb64a7011312f0a4a5a1fc9 (patch) | |
tree | 54bf701b991453e9595f984594dae552dd9fb6e4 /tests | |
parent | d904fe2273be5d39b54b987eef6b9cc0d1b85c4b (diff) | |
download | Qt-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.cpp | 3 |
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); |