summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-06-01 09:58:59 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-06-01 13:39:13 +0000
commit6fba3c1904aa7601722a70099d88126191cf60cf (patch)
treedeba70098cc9295c4c8dfced1b7ba6987c39c14b
parent0e1b4e896fba50ce6603bc323b2940e6859e7421 (diff)
Stabilize tst_qtouchevent.
- Use QTRY_COMPARE() in touchBeginWithGraphicsWidget. - Change raw event translation tests to wait for the window to become active to avoid WM positioning issues. - Blacklist the raw event translation tests on Linux. Task-number: QTBUG-46266 Change-Id: I73aae375ee279a518a2a083d0ce8919cce474cb3 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
-rw-r--r--tests/auto/gui/kernel/qtouchevent/BLACKLIST6
-rw-r--r--tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp8
2 files changed, 10 insertions, 4 deletions
diff --git a/tests/auto/gui/kernel/qtouchevent/BLACKLIST b/tests/auto/gui/kernel/qtouchevent/BLACKLIST
new file mode 100644
index 0000000000..8e78d7e41f
--- /dev/null
+++ b/tests/auto/gui/kernel/qtouchevent/BLACKLIST
@@ -0,0 +1,6 @@
+[basicRawEventTranslation]
+linux
+[multiPointRawEventTranslationOnTouchScreen]
+linux
+[multiPointRawEventTranslationOnTouchPad]
+linux
diff --git a/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp b/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp
index dc35058f66..aa1f573aa9 100644
--- a/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp
+++ b/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp
@@ -601,7 +601,7 @@ void tst_QTouchEvent::basicRawEventTranslation()
touchWidget.setAttribute(Qt::WA_AcceptTouchEvents);
touchWidget.setGeometry(100, 100, 400, 300);
touchWidget.show();
- QVERIFY(QTest::qWaitForWindowExposed(&touchWidget));
+ QVERIFY(QTest::qWaitForWindowActive(&touchWidget));
QPointF pos = touchWidget.rect().center();
QPointF screenPos = touchWidget.mapToGlobal(pos.toPoint());
@@ -738,7 +738,7 @@ void tst_QTouchEvent::multiPointRawEventTranslationOnTouchScreen()
rightWidget.setGeometry(300, 100, 100, 100);
touchWidget.show();
- QVERIFY(QTest::qWaitForWindowExposed(&touchWidget));
+ QVERIFY(QTest::qWaitForWindowActive(&touchWidget));
QPointF leftPos = leftWidget.rect().center();
QPointF rightPos = rightWidget.rect().center();
@@ -968,7 +968,7 @@ void tst_QTouchEvent::multiPointRawEventTranslationOnTouchPad()
rightWidget.setGeometry(300, 100, 100, 100);
touchWidget.show();
- QVERIFY(QTest::qWaitForWindowExposed(&touchWidget));
+ QVERIFY(QTest::qWaitForWindowActive(&touchWidget));
QPointF leftPos = leftWidget.rect().center();
QPointF rightPos = rightWidget.rect().center();
@@ -1468,7 +1468,7 @@ void tst_QTouchEvent::touchBeginWithGraphicsWidget()
.release(0, view.mapFromScene(root->mapToScene(3,3)), view.viewport())
.release(1, view.mapFromScene(root->mapToScene(6,6)), view.viewport());
- QCOMPARE(root->touchBeginCounter, 1);
+ QTRY_COMPARE(root->touchBeginCounter, 1);
QCOMPARE(root->touchUpdateCounter, 1);
QCOMPARE(root->touchEndCounter, 1);
QCOMPARE(root->touchUpdatePoints.size(), 2);