Fix anchorRewindBug test failure.
authorMichael Brasser <michael.brasser@nokia.com>
Thu, 15 Sep 2011 00:09:10 +0000 (10:09 +1000)
committerQt by Nokia <qt-info@nokia.com>
Thu, 15 Sep 2011 06:08:49 +0000 (08:08 +0200)
Task-number: QTBUG-21396

Change-Id: Ie4397242a953a3b1504873b7fbc63719d0e99081
Reviewed-on: http://codereview.qt-project.org/4927
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>

tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp

index 165179e..f3b93ef 100644 (file)
@@ -958,7 +958,11 @@ void tst_qdeclarativestates::anchorRewindBug()
 {
     QSGView *view = new QSGView;
     view->setSource(QUrl::fromLocalFile(SRCDIR "/data/anchorRewindBug.qml"));
-    qApp->processEvents();
+
+    view->show();
+    view->requestActivateWindow();
+
+    QTest::qWaitForWindowShown(view);
 
     QSGRectangle *rect = qobject_cast<QSGRectangle*>(view->rootObject());
     QVERIFY(rect != 0);