aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/controls/data/tst_switch.qml
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-05-03 16:54:16 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-05-04 09:04:11 +0000
commitff9d924d98aac8248ce99aef992920aeb99fda7e (patch)
tree111f0559bac140df5f245172a38d13921577705e /tests/auto/controls/data/tst_switch.qml
parentd3371de42f5262a2f0794a2d5e972ed50001028e (diff)
QQuickSwitch: fix the order of checkedChanged() vs. clicked()
And emit clicked() also when the switch was dragged to make it possible to use clicked() reliably to detect user interaction. Change-Id: Iefbd95b90ed40f04d84e03e247a8ac12c7f0e9ca Task-number: QTBUG-52558 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/auto/controls/data/tst_switch.qml')
-rw-r--r--tests/auto/controls/data/tst_switch.qml6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/controls/data/tst_switch.qml b/tests/auto/controls/data/tst_switch.qml
index e8e34df5..f12e7612 100644
--- a/tests/auto/controls/data/tst_switch.qml
+++ b/tests/auto/controls/data/tst_switch.qml
@@ -162,7 +162,7 @@ TestCase {
mouseMove(control, control.width * 2, control.height / 2, 0, Qt.LeftButton)
compare(control.pressed, true)
mouseRelease(control, control.width * 2, control.height / 2, Qt.LeftButton)
- compare(clickedSpy.count, 2)
+ compare(clickedSpy.count, 3)
compare(checkedSpy.count, 3)
compare(pressedSpy.count, 6)
compare(control.checked, true)
@@ -175,7 +175,7 @@ TestCase {
mouseMove(control, -control.width, control.height / 2, 0, Qt.LeftButton)
compare(control.pressed, true)
mouseRelease(control, -control.width, control.height / 2, Qt.LeftButton)
- compare(clickedSpy.count, 2)
+ compare(clickedSpy.count, 4)
compare(checkedSpy.count, 4)
compare(pressedSpy.count, 8)
compare(control.checked, false)
@@ -186,7 +186,7 @@ TestCase {
compare(pressedSpy.count, 8)
compare(control.pressed, false)
mouseRelease(control, control.width / 2, control.height / 2, Qt.RightButton)
- compare(clickedSpy.count, 2)
+ compare(clickedSpy.count, 4)
compare(checkedSpy.count, 4)
compare(pressedSpy.count, 8)
compare(control.checked, false)