Implement qWaitForWindowShown using qWaitForWindowExposed.

Deprecate qWaitForWindowShown for Qt 6 as it is just a wrapper.

Change-Id: I0f8195679679120bd402e273fed4d331dc926708
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
This commit is contained in:
Friedemann Kleint 2012-07-05 12:08:31 +02:00 committed by Qt by Nokia
parent 328e7d9684
commit 46c62433e8
2 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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);