diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2017-01-17 11:48:45 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2017-01-17 11:55:02 +0000 |
commit | 624f61b7d8ada80818b697393aa8d22595b7b8e6 (patch) | |
tree | f60d72fd427c1d3b0446da5962e269ed45da5f93 /tests/auto | |
parent | 537eced61381f0ce1eabdc797bb0dacd11e11d39 (diff) |
QQuickSpinBox: enable/disable up/down buttons on range changes
Previously the buttons were enabled/disabled on range changes only if
it caused the value to change. Make sure to update them also when the
value does not change.
Task-number: QTBUG-58217
Change-Id: Ibab5b8b7a58d5b88341c507a63b69f5a05fdfc1f
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/controls/data/tst_spinbox.qml | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/tests/auto/controls/data/tst_spinbox.qml b/tests/auto/controls/data/tst_spinbox.qml index 06426f40..76f18a99 100644 --- a/tests/auto/controls/data/tst_spinbox.qml +++ b/tests/auto/controls/data/tst_spinbox.qml @@ -120,9 +120,21 @@ TestCase { compare(control.up.indicator.enabled, true) compare(control.down.indicator.enabled, false) + control.value = 30 + compare(control.from, 25) + compare(control.value, 30) + compare(control.up.indicator.enabled, true) + compare(control.down.indicator.enabled, true) + + control.from = 30 + compare(control.from, 30) + compare(control.value, 30) + compare(control.up.indicator.enabled, true) + compare(control.down.indicator.enabled, false) + control.to = 75 compare(control.to, 75) - compare(control.value, 25) + compare(control.value, 30) compare(control.up.indicator.enabled, true) compare(control.down.indicator.enabled, false) @@ -131,7 +143,14 @@ TestCase { compare(control.up.indicator.enabled, true) compare(control.down.indicator.enabled, true) - control.to = 40; + control.to = 50 + compare(control.to, 50) + compare(control.value, 50) + compare(control.up.indicator.enabled, false) + compare(control.down.indicator.enabled, true) + + control.to = 40 + compare(control.to, 40) compare(control.value, 40) compare(control.up.indicator.enabled, false) compare(control.down.indicator.enabled, true) |