diff --git a/src/testlib/qtestsystem.h b/src/testlib/qtestsystem.h index 31c9f481c5..eb0fcb8178 100644 --- a/src/testlib/qtestsystem.h +++ b/src/testlib/qtestsystem.h @@ -120,10 +120,12 @@ namespace QTest return window->isExposed(); } - inline static bool qWaitForWindowShown(QWindow *window, int timeout = 1000) +#if QT_DEPRECATED_SINCE(6, 0) + QT_DEPRECATED inline static bool qWaitForWindowShown(QWindow *window, int timeout = 1000) { - return qWaitForWindowActive(window, timeout); + return qWaitForWindowExposed(window, timeout); } +#endif // QT_DEPRECATED_SINCE(6, 0) } QT_END_NAMESPACE diff --git a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp index a6f846045f..6c52dcbc38 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp @@ -11116,7 +11116,7 @@ void tst_QGraphicsItem::doNotMarkFullUpdateIfNotInScene() view.showFullScreen(); else view.show(); - QTest::qWaitForWindowShown(view.windowHandle()); + QTest::qWaitForWindowActive(view.windowHandle()); view.activateWindow(); QTRY_VERIFY(view.isActiveWindow()); QTRY_VERIFY(view.repaints >= 1);