Fix build when libQtGui is not available
Change-Id: I9e35d9302f58d283459f7e625c4e0b87fd1dc2bf Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
parent
196c5bfe0f
commit
5b21b6a7f0
@ -45,7 +45,9 @@
|
||||
#include <QtTest/qtestcase.h>
|
||||
#include <QtCore/qcoreapplication.h>
|
||||
#include <QtCore/qelapsedtimer.h>
|
||||
#include <QtGui/QWindow>
|
||||
#ifdef QT_GUI_LIB
|
||||
# include <QtGui/QWindow>
|
||||
#endif
|
||||
#ifdef QT_WIDGETS_LIB
|
||||
# include <QtWidgets/QWidget>
|
||||
#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)
|
||||
|
Loading…
Reference in New Issue
Block a user