diff options
author | Robin Burchell <robin.burchell@jollamobile.com> | 2013-11-13 12:41:19 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-12-13 11:30:12 +0100 |
commit | 2602b4402f3c8d867d11ea62b613b03dacc8a232 (patch) | |
tree | 21efca582761444680ebccbcc290100811d66eb3 /tests/auto/quick/qquickitem | |
parent | 9b5a688cdb77bca74529d4720ed65668a62e4b4b (diff) |
Fix touch to mouse synthesis/propagation.
Having mouse events synthesised from both QtGui and internally in QtQuick is
not a great way togo about things, especially when QtGui doesn't have the same
degree of knowledge as QtQuick about the items in the scene.
Thus, we now accept all events inside QtQuick to block QtGui synthesis, which
should fix a significant amount of edge-case touch breakage/bad behavior.
Change-Id: I14e1c87761c8f43160049b5e6f9da15b4e5edbb7
Done-with: Martin Jones <martin.jones@jollamobile.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'tests/auto/quick/qquickitem')
-rw-r--r-- | tests/auto/quick/qquickitem/tst_qquickitem.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/tests/auto/quick/qquickitem/tst_qquickitem.cpp b/tests/auto/quick/qquickitem/tst_qquickitem.cpp index 2c6dcd72ba..ad3c4fc208 100644 --- a/tests/auto/quick/qquickitem/tst_qquickitem.cpp +++ b/tests/auto/quick/qquickitem/tst_qquickitem.cpp @@ -1310,7 +1310,10 @@ void tst_qquickitem::touchEventAcceptIgnore() bool accepted = window.event(&event); QVERIFY(item->touchEventReached); - QCOMPARE(accepted && event.isAccepted(), itemSupportsTouch); + + // always true because QtQuick always eats touch events so as to not + // allow QtGui to synthesise them for us. + QCOMPARE(accepted && event.isAccepted(), true); } { QTouchEvent::TouchPoint point; @@ -1330,7 +1333,10 @@ void tst_qquickitem::touchEventAcceptIgnore() bool accepted = window.event(&event); QCOMPARE(item->touchEventReached, itemSupportsTouch); - QCOMPARE(accepted && event.isAccepted(), itemSupportsTouch); + + // always true because QtQuick always eats touch events so as to not + // allow QtGui to synthesise them for us. + QCOMPARE(accepted && event.isAccepted(), true); } { QTouchEvent::TouchPoint point; @@ -1350,7 +1356,10 @@ void tst_qquickitem::touchEventAcceptIgnore() bool accepted = window.event(&event); QCOMPARE(item->touchEventReached, itemSupportsTouch); - QCOMPARE(accepted && event.isAccepted(), itemSupportsTouch); + + // always true because QtQuick always eats touch events so as to not + // allow QtGui to synthesise them for us. + QCOMPARE(accepted && event.isAccepted(), true); } } |