From 18e89379f8db9b656885739daef5d24aa24fb92c Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Tue, 22 Nov 2011 15:13:28 +1000 Subject: [PATCH] Try again to fix currentIndex() test Seems that if the threaded renderer is disabled, updatePolish() isn't called on the view until after setCurrentIndex(), so then the view starts at the wrong position and never moves upwards when setCurrentIndex(0) is executed. Change-Id: I74da9de8ac432d27189416287e7ea5937c1d6299 Reviewed-by: Andrew den Exter --- tests/auto/declarative/qquickgridview/tst_qquickgridview.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/auto/declarative/qquickgridview/tst_qquickgridview.cpp b/tests/auto/declarative/qquickgridview/tst_qquickgridview.cpp index 3225878..bdcb27f 100644 --- a/tests/auto/declarative/qquickgridview/tst_qquickgridview.cpp +++ b/tests/auto/declarative/qquickgridview/tst_qquickgridview.cpp @@ -1346,6 +1346,7 @@ void tst_QQuickGridView::currentIndex() QQuickGridView *gridview = findItem(canvas->rootObject(), "grid"); QVERIFY(gridview != 0); + QTRY_VERIFY(!QQuickItemPrivate::get(gridview)->polishScheduled); QQuickItem *contentItem = gridview->contentItem(); QVERIFY(contentItem != 0); -- 2.7.4