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.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/auto/inc/tst_definitions.h b/tests/auto/inc/tst_definitions.h
index e12dac18..a35d53e4 100644
--- a/tests/auto/inc/tst_definitions.h
+++ b/tests/auto/inc/tst_definitions.h
@@ -63,14 +63,16 @@ QT_END_NAMESPACE
#define SKIP_IF_CANNOT_TEST_MOUSE_EVENTS() { \
do { \
QPushButton b; \
- b.resize(100, 100); \
+ b.resize(120, 100); \
b.show(); \
QTest::qWaitForWindowShown(&b); \
QSignalSpy spy(&b, SIGNAL(clicked())); \
QTest::mouseClick(&b, Qt::LeftButton, 0, b.rect().center()); \
+ QApplication::processEvents(); \
if (spy.count() == 0) \
QSKIP("Cannot test mouse events in this environment"); \
} while (0); \
+ QApplication::processEvents(); \
}
#define SKIP_ON_POLAR() { \
@@ -83,6 +85,12 @@ QT_END_NAMESPACE
QSKIP("Test not supported by cartesian chart"); \
}
+// Synthetic mouse moves do not trigger hover events reliably in many virtual machines,
+// so we skip tests involving mouse moves.
+ #define SKIP_IF_FLAKY_MOUSE_MOVE() { \
+ QSKIP("Skipping test with synthetic mouse moves."); \
+ }
+
static inline bool isPolarTest()
{
static bool isPolar = false;