Port away from qWaitForWindowShown.
authorStephen Kelly <stephen.kelly@kdab.com>
Wed, 22 Aug 2012 09:41:55 +0000 (11:41 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 22 Aug 2012 12:21:23 +0000 (14:21 +0200)
It is deprecated.

Change-Id: Icf29b1f5ab6cb06ee7fd375fb96242df7ee3083e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
tests/auto/particles/shared/particlestestsshared.h
tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp

index 6cd805a..f1c7c85 100644 (file)
@@ -74,7 +74,7 @@ QQuickView* createView(const QUrl &filename, int additionalWait=0)
     if (view->status() != QQuickView::Ready)
         return 0;
     view->show();
-    QTest::qWaitForWindowShown(view);
+    QTest::qWaitForWindowExposed(view);
     if (additionalWait)
         QTest::qWait(additionalWait);
 
index 7b98099..60f7469 100644 (file)
@@ -5651,8 +5651,8 @@ void tst_qquicktextinput::backspaceSurrogatePairs()
     textInput->setParentItem(window.contentItem());
     window.show();
     window.requestActivateWindow();
-    QTest::qWaitForWindowShown(&window);
-    QTRY_COMPARE(QGuiApplication::focusWindow(), &window);
+    QVERIFY(QTest::qWaitForWindowActive(&window));
+    QCOMPARE(QGuiApplication::focusWindow(), &window);
 
     for (int i = text.length(); i >= 0; i -= 2) {
         QCOMPARE(textInput->text(), text.mid(0, i));