summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativelistview
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2011-02-28 00:12:47 (GMT)
committerMartin Jones <martin.jones@nokia.com>2011-02-28 00:12:47 (GMT)
commitb2a0db11c81a47c45d2617b64fef650a830b53f7 (patch)
treed84b38fedaaf8ad250dac2d2f269186b033efefc /tests/auto/declarative/qdeclarativelistview
parentf3ed538a99adf5dc60305c257feb181d46de3748 (diff)
downloadQt-b2a0db11c81a47c45d2617b64fef650a830b53f7.zip
Qt-b2a0db11c81a47c45d2617b64fef650a830b53f7.tar.gz
Qt-b2a0db11c81a47c45d2617b64fef650a830b53f7.tar.bz2
Fix test instability.
Allow the asynchronous view changes to complete before testing section positions. Change-Id: I09c7592205b6e3c55807ec1c5aa4b09f9cd8b92c
Diffstat (limited to 'tests/auto/declarative/qdeclarativelistview')
-rw-r--r--tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
index e8b6028..cceeb63 100644
--- a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
+++ b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
@@ -1106,6 +1106,8 @@ void tst_QDeclarativeListView::sectionsDelegate()
model.modifyItem(11, "Two", "aaa");
QTest::qWait(100);
canvas->rootObject()->setProperty("sectionProperty", "name");
+ // ensure view has settled.
+ QTRY_COMPARE(findItems<QDeclarativeItem>(contentItem, "sect_Four").count(), 1);
for (int i = 0; i < 4; ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(contentItem,
"sect_" + model.name(i*3));