aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/touchmouse
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2016-07-26 23:52:31 +0200
committerFrederik Gladhorn <frederik.gladhorn@qt.io>2016-07-28 20:12:18 +0000
commit80dbc30e97c4c6def74a026ce0b50390990cc612 (patch)
tree462140b275b53c5a2fe3b9ba46d6fa55ec01c5b7 /tests/auto/quick/touchmouse
parent05d7fb5bd261746f4fc5ed5c23fd0b1bb8f3c087 (diff)
Touch and mouse handling: don't pre-grab
The touchmouse test needs adjusting since we don't see ungrab events any more (which makes sense, nobody actively grabbed anything there). The comment about storing the touchMouseId early enough is invalid - any item that wants to steal the grab, has to call grab anyway. The reason to only update the grab when there is no grabber set yet, is that in the filterChildMouse stuff some other item might steal the event, setting the grabber there - that must not be overridden when we come back to the original event handling. Change-Id: I4f191b16f4d76113d0c88414b5a80eb1baf99be1 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Diffstat (limited to 'tests/auto/quick/touchmouse')
-rw-r--r--tests/auto/quick/touchmouse/tst_touchmouse.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/auto/quick/touchmouse/tst_touchmouse.cpp b/tests/auto/quick/touchmouse/tst_touchmouse.cpp
index 24682bb7a3..4170a31a54 100644
--- a/tests/auto/quick/touchmouse/tst_touchmouse.cpp
+++ b/tests/auto/quick/touchmouse/tst_touchmouse.cpp
@@ -285,17 +285,16 @@ void tst_TouchMouse::simpleTouchEvent()
p1 = QPoint(20, 20);
QTest::touchEvent(window, device).press(0, p1, window);
QQuickTouchUtils::flush(window);
- QCOMPARE(eventItem1->eventList.size(), 3);
+ QCOMPARE(eventItem1->eventList.size(), 2);
QCOMPARE(eventItem1->eventList.at(0).type, QEvent::TouchBegin);
QCOMPARE(eventItem1->eventList.at(1).type, QEvent::MouseButtonPress);
- QCOMPARE(eventItem1->eventList.at(2).type, QEvent::UngrabMouse);
p1 += QPoint(10, 0);
QTest::touchEvent(window, device).move(0, p1, window);
QQuickTouchUtils::flush(window);
- QCOMPARE(eventItem1->eventList.size(), 3);
+ QCOMPARE(eventItem1->eventList.size(), 2);
QTest::touchEvent(window, device).release(0, p1, window);
QQuickTouchUtils::flush(window);
- QCOMPARE(eventItem1->eventList.size(), 3);
+ QCOMPARE(eventItem1->eventList.size(), 2);
eventItem1->eventList.clear();
// wait to avoid getting a double click event