diff options
author | Bea Lam <bea.lam@nokia.com> | 2011-07-18 14:14:43 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-07-25 06:08:56 +0200 |
commit | 2c4c10942314ab76fa8f06f690e44adc6b7f2199 (patch) | |
tree | 38dc9641fb37e17837c3eb63542ca0272fe54297 /tests | |
parent | 55aeb36ab13833de4b2a86922017006fe15ad77e (diff) |
Fix unstable GridView test
Change-Id: I1e1f1afe38cced3c85b3e20d37e9859b8304e69c
Reviewed-on: http://codereview.qt.nokia.com/1729
Reviewed-by: Bea Lam <bea.lam@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/declarative/qsggridview/tst_qsggridview.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/declarative/qsggridview/tst_qsggridview.cpp b/tests/auto/declarative/qsggridview/tst_qsggridview.cpp index c97a42b68b..3929c712af 100644 --- a/tests/auto/declarative/qsggridview/tst_qsggridview.cpp +++ b/tests/auto/declarative/qsggridview/tst_qsggridview.cpp @@ -666,6 +666,7 @@ void tst_QSGGridView::currentIndex() QSGView *canvas = new QSGView(0); canvas->setFixedSize(240,320); + canvas->show(); QDeclarativeContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); @@ -726,6 +727,7 @@ void tst_QSGGridView::currentIndex() gridview->moveCurrentIndexLeft(); QCOMPARE(gridview->currentIndex(), model.count()-1); + qApp->processEvents(); QTRY_COMPARE(gridview->contentY(), 880.0); gridview->moveCurrentIndexRight(); @@ -734,7 +736,6 @@ void tst_QSGGridView::currentIndex() QTRY_COMPARE(gridview->contentY(), 0.0); // Test keys - canvas->show(); qApp->setActiveWindow(canvas); #ifdef Q_WS_X11 // to be safe and avoid failing setFocus with window managers |