aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/controls/data/tst_slider.qml
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-06-12 22:03:59 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-06-13 11:00:38 +0000
commitb17cf27b1afd5045aa6bce923f9eebc439d4fc39 (patch)
tree5159581e93c477359fe7bcf8d9ca3d3581423bee /tests/auto/controls/data/tst_slider.qml
parentb6e62658322fe2d23b5df9376484c3ad259d2bc6 (diff)
Fix Slider to react if only clicked
The idea was to avoid accidental value changes while flicking over a slider, but that case should be covered well enough by handling mouseUngrabEvent(). [ChgangeLog][Important Behavior Changes] Slider has been fixed to react to clicks. Task-number: QTBUG-53846 Change-Id: I0d52f805af8867655945c57ad77ccb85704a4462 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/auto/controls/data/tst_slider.qml')
-rw-r--r--tests/auto/controls/data/tst_slider.qml6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_slider.qml b/tests/auto/controls/data/tst_slider.qml
index 142906c6..a9f670ab 100644
--- a/tests/auto/controls/data/tst_slider.qml
+++ b/tests/auto/controls/data/tst_slider.qml
@@ -286,6 +286,12 @@ TestCase {
verify(control.value <= 0.25 && control.value >= 0.0)
verify(control.position <= 0.25 && control.position >= 0.0)
+ // QTBUG-53846
+ mouseClick(control, control.width * 0.5, control.height * 0.5, Qt.LeftButton)
+ compare(pressedSpy.count, 6)
+ compare(control.value, 0.5)
+ compare(control.position, 0.5)
+
control.destroy()
}