diff --git a/src/testlib/qtestsystem.h b/src/testlib/qtestsystem.h index 2f3f499d47..094570bb8c 100644 --- a/src/testlib/qtestsystem.h +++ b/src/testlib/qtestsystem.h @@ -45,7 +45,9 @@ #include #include #include -#include +#ifdef QT_GUI_LIB +# include +#endif #ifdef QT_WIDGETS_LIB # include #endif @@ -69,6 +71,7 @@ namespace QTest } while (timer.elapsed() < ms); } +#ifdef QT_GUI_LIB inline static bool qWaitForWindowActive(QWindow *window, int timeout = 1000) { QElapsedTimer timer; @@ -112,6 +115,7 @@ namespace QTest } return window->isExposed(); } +#endif #ifdef QT_WIDGETS_LIB inline static bool qWaitForWindowActive(QWidget *widget, int timeout = 1000)