summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-03-10 06:02:56 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-03-10 06:02:56 (GMT)
commit5f10fa564830cbfb79061c6108098c7e133b79aa (patch)
tree13f28695714c3f1bee5b2dd0a708328b44497018 /tests
parent858e01e954ac9f3203ada6b61b47c418cc4b0a82 (diff)
downloadQt-5f10fa564830cbfb79061c6108098c7e133b79aa.zip
Qt-5f10fa564830cbfb79061c6108098c7e133b79aa.tar.gz
Qt-5f10fa564830cbfb79061c6108098c7e133b79aa.tar.bz2
Schedule view relayout after itemsInserted/Removed()
So that they handle model changes involving multiple insertion and deletion without entering the event loop.
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
index 75fbbf8..17257ae 100644
--- a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
+++ b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
@@ -925,6 +925,7 @@ void tst_QDeclarativeListView::sections()
// Remove section boundary
model.removeItem(5);
+ QTest::qWait(100);
// New section header created
QDeclarativeItem *item = findItem<QDeclarativeItem>(viewport, "wrapper", 5);
@@ -932,6 +933,7 @@ void tst_QDeclarativeListView::sections()
QCOMPARE(item->height(), 40.0);
model.insertItem(3, "New Item", "0");
+ QTest::qWait(100);
// Section header moved
item = findItem<QDeclarativeItem>(viewport, "wrapper", 5);
@@ -944,6 +946,7 @@ void tst_QDeclarativeListView::sections()
// insert item which will become a section header
model.insertItem(6, "Replace header", "1");
+ QTest::qWait(100);
item = findItem<QDeclarativeItem>(viewport, "wrapper", 6);
QVERIFY(item);