diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-03-10 06:02:56 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-03-10 06:02:56 (GMT) |
commit | 5f10fa564830cbfb79061c6108098c7e133b79aa (patch) | |
tree | 13f28695714c3f1bee5b2dd0a708328b44497018 /tests | |
parent | 858e01e954ac9f3203ada6b61b47c418cc4b0a82 (diff) | |
download | Qt-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.cpp | 3 |
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); |