diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2012-07-20 12:49:12 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-25 07:24:49 +0200 |
commit | 4677cf3d014d9b25c3516dd0e07a1a3fcd8af8e9 (patch) | |
tree | d2e8f109b850c13346c85b6e3dca0077530ac45b /tests/auto/gui | |
parent | a4cd6ef25df6a2a99626a0e97bfc239f68e7771f (diff) |
Deprecate the qWaitForWindowShown(QWindow *) method.
While the qWaitForWindowShown(QWidget *) is inherited
from Qt 4.8, the qWaitForWindowShown(QWindow *) was introduced
in Qt 5. As it is identical to qWaitForWindowExposed()
and removed already, it can be deprecated in Qt 5.
Remove its usages in qtbase.
Change-Id: I28788d120ad687a49f02b2b44de6b38a2832fe5c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Diffstat (limited to 'tests/auto/gui')
4 files changed, 21 insertions, 21 deletions
diff --git a/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp b/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp index b9bf79ee65..8eb0234c2c 100644 --- a/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp +++ b/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp @@ -107,9 +107,9 @@ void tst_QGuiApplication::focusObject() // verify active window focus propagates to qguiapplication - QTest::qWaitForWindowShown(&window1); window1.requestActivateWindow(); - QTRY_COMPARE(app.focusWindow(), &window1); + QVERIFY(QTest::qWaitForWindowActive(&window1)); + QCOMPARE(app.focusWindow(), &window1); window1.setFocusObject(&obj1); QCOMPARE(app.focusObject(), &obj1); @@ -124,7 +124,7 @@ void tst_QGuiApplication::focusObject() window2.setFocusObject(&obj3); QCOMPARE(app.focusObject(), &obj2); // not yet changed window2.show(); - QTest::qWaitForWindowShown(&window2); + QVERIFY(QTest::qWaitForWindowExposed(&window2)); QTRY_COMPARE(app.focusWindow(), &window2); QCOMPARE(app.focusObject(), &obj3); QCOMPARE(spy.count(), 1); @@ -241,8 +241,8 @@ void tst_QGuiApplication::changeFocusWindow() FocusChangeWindow window1, window2; window1.show(); window2.show(); - QTest::qWaitForWindowShown(&window1); - QTest::qWaitForWindowShown(&window2); + QVERIFY(QTest::qWaitForWindowExposed(&window1)); + QVERIFY(QTest::qWaitForWindowExposed(&window2)); window1.requestActivateWindow(); QTRY_COMPARE(app.focusWindow(), &window1); @@ -259,7 +259,7 @@ void tst_QGuiApplication::keyboardModifiers() QWindow *window = new QWindow; window->show(); - QTest::qWaitForWindowShown(window); + QVERIFY(QTest::qWaitForWindowExposed(window)); QCOMPARE(QGuiApplication::keyboardModifiers(), Qt::NoModifier); // mouse events @@ -378,8 +378,8 @@ void tst_QGuiApplication::modalWindow() // show the 2 windows, nothing is blocked window1->show(); window2->show(); - QTest::qWaitForWindowShown(window1); - QTest::qWaitForWindowShown(window2); + QVERIFY(QTest::qWaitForWindowExposed(window1)); + QVERIFY(QTest::qWaitForWindowExposed(window2)); QCOMPARE(app.modalWindow(), static_cast<QWindow *>(0)); QCOMPARE(window1->blocked, 0); QCOMPARE(window2->blocked, 0); diff --git a/tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp b/tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp index 5bbd4958da..1b468847b2 100644 --- a/tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp +++ b/tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp @@ -313,7 +313,7 @@ void tst_qinputmethod::inputMethodAccepted() DummyWindow window; window.show(); - QTest::qWaitForWindowShown(&window); + QVERIFY(QTest::qWaitForWindowExposed(&window)); window.requestActivateWindow(); QTRY_COMPARE(qApp->focusWindow(), &window); window.setFocusObject(&disabledItem); diff --git a/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp b/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp index 3adf2868be..ee5cb8efeb 100644 --- a/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp +++ b/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp @@ -1503,7 +1503,7 @@ void tst_QTouchEvent::testQGuiAppDelivery() QWindow *w = new QWindow; w->setGeometry(100, 100, 100, 100); w->show(); - QTest::qWaitForWindowShown(w); + QVERIFY(QTest::qWaitForWindowExposed(w)); WindowTouchEventFilter filter; w->installEventFilter(&filter); @@ -1563,7 +1563,7 @@ void tst_QTouchEvent::testMultiDevice() QWindow *w = new QWindow; w->setGeometry(100, 100, 100, 100); w->show(); - QTest::qWaitForWindowShown(w); + QVERIFY(QTest::qWaitForWindowExposed(w)); WindowTouchEventFilter filter; w->installEventFilter(&filter); diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp index 73f70fbe3c..f2393f905e 100644 --- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp +++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp @@ -420,7 +420,7 @@ void tst_QWindow::testInputEvents() InputTestWindow window; window.setGeometry(80, 80, 40, 40); window.show(); - QTest::qWaitForWindowShown(&window); + QVERIFY(QTest::qWaitForWindowExposed(&window)); QWindowSystemInterface::handleKeyEvent(&window, QEvent::KeyPress, Qt::Key_A, Qt::NoModifier); QWindowSystemInterface::handleKeyEvent(&window, QEvent::KeyRelease, Qt::Key_A, Qt::NoModifier); @@ -478,7 +478,7 @@ void tst_QWindow::touchToMouseTranslation() window.ignoreTouch = true; window.setGeometry(80, 80, 40, 40); window.show(); - QTest::qWaitForWindowShown(&window); + QVERIFY(QTest::qWaitForWindowExposed(&window)); QList<QWindowSystemInterface::TouchPoint> points; QWindowSystemInterface::TouchPoint tp1, tp2; @@ -554,7 +554,7 @@ void tst_QWindow::mouseToTouchTranslation() window.ignoreMouse = true; window.setGeometry(80, 80, 40, 40); window.show(); - QTest::qWaitForWindowShown(&window); + QVERIFY(QTest::qWaitForWindowExposed(&window)); QWindowSystemInterface::handleMouseEvent(&window, QPoint(10, 10), window.mapToGlobal(QPoint(10, 10)), Qt::LeftButton); QWindowSystemInterface::handleMouseEvent(&window, QPoint(10, 10), window.mapToGlobal(QPoint(10, 10)), Qt::NoButton); @@ -603,7 +603,7 @@ void tst_QWindow::mouseToTouchLoop() window.ignoreTouch = true; window.setGeometry(80, 80, 40, 40); window.show(); - QTest::qWaitForWindowShown(&window); + QVERIFY(QTest::qWaitForWindowExposed(&window)); QWindowSystemInterface::handleMouseEvent(&window, QPoint(10, 10), window.mapToGlobal(QPoint(10, 10)), Qt::LeftButton); QWindowSystemInterface::handleMouseEvent(&window, QPoint(10, 10), window.mapToGlobal(QPoint(10, 10)), Qt::NoButton); @@ -618,7 +618,7 @@ void tst_QWindow::touchCancel() InputTestWindow window; window.setGeometry(80, 80, 40, 40); window.show(); - QTest::qWaitForWindowShown(&window); + QVERIFY(QTest::qWaitForWindowExposed(&window)); QList<QWindowSystemInterface::TouchPoint> points; QWindowSystemInterface::TouchPoint tp1; @@ -678,7 +678,7 @@ void tst_QWindow::touchCancelWithTouchToMouse() window.ignoreTouch = true; window.setGeometry(80, 80, 40, 40); window.show(); - QTest::qWaitForWindowShown(&window); + QVERIFY(QTest::qWaitForWindowExposed(&window)); QList<QWindowSystemInterface::TouchPoint> points; QWindowSystemInterface::TouchPoint tp1; @@ -757,9 +757,9 @@ void tst_QWindow::activateAndClose() for (int i = 0; i < 10; ++i) { QWindow window; window.show(); - QTest::qWaitForWindowShown(&window); window.requestActivateWindow(); - QTRY_COMPARE(qGuiApp->focusWindow(), &window); + QVERIFY(QTest::qWaitForWindowActive(&window)); + QCOMPARE(qGuiApp->focusWindow(), &window); } } @@ -770,7 +770,7 @@ void tst_QWindow::mouseEventSequence() InputTestWindow window; window.setGeometry(80, 80, 40, 40); window.show(); - QTest::qWaitForWindowShown(&window); + QVERIFY(QTest::qWaitForWindowExposed(&window)); ulong timestamp = 0; QPointF local(12, 34); @@ -892,7 +892,7 @@ void tst_QWindow::inputReentrancy() window.setGeometry(80, 80, 40, 40); window.show(); - QTest::qWaitForWindowShown(&window); + QVERIFY(QTest::qWaitForWindowExposed(&window)); // Queue three events. QPointF local(12, 34); |