From: Daiwei Li Date: Fri, 23 Jan 2015 22:42:33 +0000 (-0800) Subject: qquicktest: Wait for the view to finish loading X-Git-Tag: v5.5.90+alpha1~3^2~242^2~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=81b876b7177cf0d55b7c009342e501bfa900175c;p=platform%2Fupstream%2Fqtdeclarative.git qquicktest: Wait for the view to finish loading Tests can be skipped if the view is still loading by the time we get to the end of the loop. There is a case where the window is active but the QML hasn't been loaded. Change-Id: I4e8346ee547653810458d042925d673748c1fec8 Reviewed-by: Caroline Chao Reviewed-by: Friedemann Kleint Reviewed-by: J-P Nurmi --- diff --git a/src/qmltest/quicktest.cpp b/src/qmltest/quicktest.cpp index bef20c6..0c8bfab 100644 --- a/src/qmltest/quicktest.cpp +++ b/src/qmltest/quicktest.cpp @@ -362,6 +362,10 @@ int quick_test_main(int argc, char **argv, const char *name, const char *sourceD } view->show(); view->requestActivate(); + + while (view->status() == QQuickView::Loading) + QTest::qWait(10); + QTest::qWaitForWindowActive(view); if (view->isExposed()) QTestRootObject::instance()->setWindowShown(true);