aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2018-02-20 12:35:31 +0100
committerJ-P Nurmi <jpnurmi@qt.io>2018-02-20 14:28:50 +0000
commitf008d17de8bc37f614e45b4ba557f3d2b428b178 (patch)
treecc27ed10ae8a0942bcf83e147c00c36edb750343 /tests/auto
parent48dd6b7e4a03811a9a113aef2687d34db726a856 (diff)
tst_switchdelegate: fix test_mouse/test_touch failures
Same as a1eaa30b for tst_switch. Use the correct coordinates for the middle of the switch. Otherwise this test fails in static builds. Task-number: QTBUG-62241 Change-Id: Ic99babac5c41f5130931790d8cd984fac72cb785 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/controls/data/tst_switchdelegate.qml12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/auto/controls/data/tst_switchdelegate.qml b/tests/auto/controls/data/tst_switchdelegate.qml
index 8f240409..187a61bd 100644
--- a/tests/auto/controls/data/tst_switchdelegate.qml
+++ b/tests/auto/controls/data/tst_switchdelegate.qml
@@ -194,15 +194,15 @@ TestCase {
// release in the middle
spy.expectedSequence = [["pressedChanged", { "pressed": true, "checked": false }],
"pressed"]
- mousePress(control.indicator, 0, 0, Qt.LeftButton)
+ mousePress(control, 0, 0, Qt.LeftButton)
compare(control.pressed, true)
verify(spy.success)
- mouseMove(control.indicator, control.indicator.width / 2 - 1, 0)
+ mouseMove(control, control.width / 2, control.height / 2, 0, Qt.LeftButton)
compare(control.pressed, true)
spy.expectedSequence = [["pressedChanged", { "pressed": false, "checked": false }],
"released",
"clicked"]
- mouseRelease(control.indicator, control.indicator.width / 2 - 1, 0, Qt.LeftButton)
+ mouseRelease(control, control.width / 2, control.height / 2, Qt.LeftButton)
compare(control.checked, false)
compare(control.pressed, false)
tryCompare(control, "position", 0) // QTBUG-57944
@@ -297,15 +297,15 @@ TestCase {
// release in the middle
spy.expectedSequence = [["pressedChanged", { "pressed": true, "checked": false }],
"pressed"]
- touch.press(0, control.indicator, 0, 0).commit()
+ touch.press(0, control, 0, 0).commit()
compare(control.pressed, true)
verify(spy.success)
- touch.move(0, control.indicator, control.indicator.width / 2 - 1).commit()
+ touch.move(0, control, control.width / 2, control.height / 2).commit()
compare(control.pressed, true)
spy.expectedSequence = [["pressedChanged", { "pressed": false, "checked": false }],
"released",
"clicked"]
- touch.release(0, control.indicator, control.indicator.width / 2 - 1, 0).commit()
+ touch.release(0, control, control.width / 2, control.height / 2).commit()
compare(control.checked, false)
compare(control.pressed, false)
tryCompare(control, "position", 0) // QTBUG-57944