diff options
author | Jan Arve Sæther <jan-arve.saether@qt.io> | 2017-10-05 17:46:33 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-10-05 18:14:46 +0000 |
commit | d6358abf1719f920a7cadc85734c1ba520a52c25 (patch) | |
tree | 14084df37f09c3645abec0f501abfd3e1ecb706f | |
parent | 6b6ee829c7e0df302eba30ce1f96302c5661279c (diff) |
Fix bug in qmltest/events/tst_touch
The "internal" MPTA was a child of the "touchArea" MPTA and was
covering the region (50,0,100x50). Thus, it extended vertically from
the top down to y-pixel position 50. (QRects are inclusive)
Sending a touch event to (50,50) would therefore hit the internal MPTA,
but the test expected it to hit the outer MPTA.
Change-Id: I648f004c56b59f4968d54bf14d2c1908610e93ed
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
-rw-r--r-- | tests/auto/qmltest/events/tst_touch.qml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/qmltest/events/tst_touch.qml b/tests/auto/qmltest/events/tst_touch.qml index fd603e5a71..b7fa701429 100644 --- a/tests/auto/qmltest/events/tst_touch.qml +++ b/tests/auto/qmltest/events/tst_touch.qml @@ -183,10 +183,10 @@ MultiPointTouchArea { function test_simpleChain() { var first = 1; - touchEvent(touchArea).press(first).commit().release(first).commit(); - compare(touchUpdatedSpy.count, 2); - var touchPoint = touchUpdatedSpy.signalArguments[0][0][0]; - verify(comparePoint(touchPoint, first, touchArea.width / 2, touchArea.height / 2)); + touchEvent(interior).press(first).commit().release(first).commit(); + compare(interiorSpy.count, 2); + var touchPoint = interiorSpy.signalArguments[0][0][0]; + verify(comparePoint(touchPoint, first, interior.width / 2, interior.height / 2)); } } } |