From bffd219c599a9feae521dd9a709b2e20663f49ac Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 22 Aug 2012 11:41:55 +0200 Subject: Port away from qWaitForWindowShown. It is deprecated. Change-Id: Icf29b1f5ab6cb06ee7fd375fb96242df7ee3083e Reviewed-by: Friedemann Kleint --- tests/auto/particles/shared/particlestestsshared.h | 2 +- tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/auto/particles/shared/particlestestsshared.h b/tests/auto/particles/shared/particlestestsshared.h index 6cd805a64c..f1c7c85140 100644 --- a/tests/auto/particles/shared/particlestestsshared.h +++ b/tests/auto/particles/shared/particlestestsshared.h @@ -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); diff --git a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp index 7b9809908d..60f7469aa5 100644 --- a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp +++ b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp @@ -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)); -- cgit v1.2.3