Use the same timeout value for all QTest::qWaitForWindow*() functions

Some were 5s, others 1s. Pick one (the higher).

Change-Id: I81929d4f49c2e41b4d4b75c3e2bf8ff75af868ad
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
bb10
Marc Mutz 2017-03-01 14:41:14 +01:00
parent 3a1f4b186d
commit 9e7d769462
1 changed files with 3 additions and 3 deletions

View File

@ -114,14 +114,14 @@ namespace QTest
#endif
#ifdef QT_WIDGETS_LIB
inline static bool qWaitForWindowActive(QWidget *widget, int timeout = 1000)
inline static bool qWaitForWindowActive(QWidget *widget, int timeout = 5000)
{
if (QWindow *window = widget->windowHandle())
return qWaitForWindowActive(window, timeout);
return false;
}
inline static bool qWaitForWindowExposed(QWidget *widget, int timeout = 1000)
inline static bool qWaitForWindowExposed(QWidget *widget, int timeout = 5000)
{
if (QWindow *window = widget->windowHandle())
return qWaitForWindowExposed(window, timeout);
@ -131,7 +131,7 @@ namespace QTest
#if QT_DEPRECATED_SINCE(5, 0)
# ifdef QT_WIDGETS_LIB
QT_DEPRECATED inline static bool qWaitForWindowShown(QWidget *widget, int timeout = 1000)
QT_DEPRECATED inline static bool qWaitForWindowShown(QWidget *widget, int timeout = 5000)
{
return qWaitForWindowExposed(widget, timeout);
}