##// END OF EJS Templates
Fixed the SKIP_IF_CANNOT_TEST_MOUSE_EVENTS on Qt5
Marek Rosa -
r2063:da4e011c304c
parent child
Show More
@@ -39,6 +39,20
39 39 // Some bamboo clients have trouble passing mouse events to the test application.
40 40 // This can be used to skip those tests so that they don't show up as a failure
41 41 // in the test report.
42 #ifdef QT5_QUICK_1
43 #define SKIP_IF_CANNOT_TEST_MOUSE_EVENTS() { \
44 do { \
45 QPushButton b; \
46 b.resize(100, 100); \
47 b.show(); \
48 QTest::qWaitForWindowShown(&b); \
49 QSignalSpy spy(&b, SIGNAL(clicked())); \
50 QTest::mouseClick(&b, Qt::LeftButton, 0, b.rect().center()); \
51 if (spy.count() == 0) \
52 QSKIP("Cannot test mouse events in this environment"); \
53 } while (0); \
54 }
55 #else
42 56 #define SKIP_IF_CANNOT_TEST_MOUSE_EVENTS() { \
43 57 do { \
44 58 QPushButton b; \
@@ -51,5 +65,6
51 65 QSKIP("Cannot test mouse events in this environment", SkipAll); \
52 66 } while (0); \
53 67 }
68 #endif
54 69
55 70 #endif // TST_DEFINITIONS_H
General Comments 0
You need to be logged in to leave comments. Login now