summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2012-07-20 12:49:12 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-25 07:24:49 +0200
commit4677cf3d014d9b25c3516dd0e07a1a3fcd8af8e9 (patch)
treed2e8f109b850c13346c85b6e3dca0077530ac45b /tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
parenta4cd6ef25df6a2a99626a0e97bfc239f68e7771f (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/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp')
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
index 1c5702d15f..7299e2ad8b 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
@@ -1078,7 +1078,7 @@ void tst_QGraphicsScene::addItem()
CustomView view;
view.setScene(&scene);
view.show();
- QTest::qWaitForWindowShown(view.windowHandle());
+ QVERIFY(QTest::qWaitForWindowExposed(&view));
qApp->processEvents();
view.repaints = 0;
@@ -1606,10 +1606,9 @@ void tst_QGraphicsScene::hoverEvents_siblings()
view.rotate(10);
view.scale(1.7, 1.7);
view.show();
- QTest::qWaitForWindowShown(view.windowHandle());
qApp->setActiveWindow(&view);
view.activateWindow();
- QTest::qWait(70);
+ QVERIFY(QTest::qWaitForWindowActive(&view));
QCursor::setPos(view.mapToGlobal(QPoint(-5, -5)));
@@ -2737,8 +2736,8 @@ void tst_QGraphicsScene::contextMenuEvent()
QGraphicsView view(&scene);
view.show();
- QTest::qWaitForWindowShown(view.windowHandle());
view.activateWindow();
+ QVERIFY(QTest::qWaitForWindowActive(&view));
view.centerOn(item);
{
@@ -2771,7 +2770,7 @@ void tst_QGraphicsScene::contextMenuEvent_ItemIgnoresTransformations()
QGraphicsView view(&scene, &topLevel);
view.resize(200, 200);
topLevel.show();
- QTest::qWaitForWindowShown(topLevel.windowHandle());
+ QVERIFY(QTest::qWaitForWindowExposed(&topLevel));
{
QPoint pos(50, 50);