summaryrefslogtreecommitdiff
path: root/tests/auto/controls/data/tst_slider.qml
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-10-30 08:45:06 +0100
committerLiang Qi <liang.qi@qt.io>2017-10-30 09:17:43 +0100
commit1320f7f9840e94db66988f2dce265dfd373add27 (patch)
tree59d191178b86522b19fff44c592ac905326d86b1 /tests/auto/controls/data/tst_slider.qml
parentb2922baedd8b6a2aa1e6aa49a28e774e331c2be9 (diff)
parent296810ea4bb4f734881a517eb101e5b948c1905b (diff)
downloadqtquickcontrols-1320f7f9840e94db66988f2dce265dfd373add27.tar.gz
Merge remote-tracking branch 'origin/5.9' into 5.10v5.10.0-beta4
Conflicts: .qmake.conf Change-Id: Ia33462a31303ae79f7a6ef26dc6065a0afeef3e1
Diffstat (limited to 'tests/auto/controls/data/tst_slider.qml')
-rw-r--r--tests/auto/controls/data/tst_slider.qml15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/auto/controls/data/tst_slider.qml b/tests/auto/controls/data/tst_slider.qml
index a27cf70e..9e2ba0f1 100644
--- a/tests/auto/controls/data/tst_slider.qml
+++ b/tests/auto/controls/data/tst_slider.qml
@@ -399,7 +399,7 @@ Item {
}
}
- function test_minimumValueLargerThanValue() {
+ function test_minimumMaximumValueLargerThanValue() {
var control = sliderComponent.createObject(container, { "style": namedHandleStyle, "minimumValue": 0, "maximumValue": 2, value: "minimumValue" });
verify(control);
@@ -412,6 +412,19 @@ Item {
compare(control.value, control.minimumValue);
compare(handle.mapToItem(null, 0, 0).x, 0)
+ control.maximumValue = 5;
+ control.value = 5;
+ compare(control.value, 5);
+
+ // get the slider position at max
+ var maxPos = handle.mapToItem(null, 0, 0).x;
+
+ // reduce the maximum value, resulting in the value becoming 4 as well
+ control.maximumValue = 4;
+ compare(control.value, 4);
+ // make sure that the actual position of the handle is the same (it used to be off - see QTBUG-63354)
+ compare(handle.mapToItem(null, 0, 0).x, maxPos);
+
control.destroy();
}
}