summaryrefslogtreecommitdiffstats
path: root/tests/auto/inc/tst_definitions.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/inc/tst_definitions.h')
-rw-r--r--tests/auto/inc/tst_definitions.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/inc/tst_definitions.h b/tests/auto/inc/tst_definitions.h
index 5adb93c3..08524db1 100644
--- a/tests/auto/inc/tst_definitions.h
+++ b/tests/auto/inc/tst_definitions.h
@@ -24,6 +24,17 @@
#include <QtTest/QtTest>
#include <QPushButton>
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
+namespace QTest
+{
+ // This was deprecated in Qt5. This is a small hack for the sake of compatibility.
+ inline static bool qWaitForWindowShown(QWidget *window)
+ {
+ return QTest::qWaitForWindowExposed(window);
+ }
+}
+#endif
+
#define TRY_COMPARE(actual, expected) { \
do { \
const int timeout(1000); \