diff options
author | Jens Bache-Wiig <jens.bache-wiig@digia.com> | 2013-03-07 14:29:15 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-07 18:33:05 +0100 |
commit | c58290ee7af6f2abcd08cbf319ff6f85b9db9fdb (patch) | |
tree | a05314476cbbb57cfb4983d63fd2671308ebec79 /tests/auto/controls/data/tst_spinbox.qml | |
parent | 8c142768e42c450c14225b1d9354836aec0b0126 (diff) | |
download | qtquickcontrols-c58290ee7af6f2abcd08cbf319ff6f85b9db9fdb.tar.gz |
Fix initialization value of SpinBox
The maximumValue 99 was enforced on value _before_ we had a chance
to update it. This made it sometimes impossible to get a maximumValue
higher than 99.
Change-Id: Ia07a9271d563fd3496b583757df757c1e7b4ceb5
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'tests/auto/controls/data/tst_spinbox.qml')
-rw-r--r-- | tests/auto/controls/data/tst_spinbox.qml | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_spinbox.qml b/tests/auto/controls/data/tst_spinbox.qml index e3105384..b725b88a 100644 --- a/tests/auto/controls/data/tst_spinbox.qml +++ b/tests/auto/controls/data/tst_spinbox.qml @@ -255,6 +255,18 @@ Item { compare(spinbox.value, spinbox.maximumValue) } + function test_initialization_order() + { + var spinbox = Qt.createQmlObject("import QtQuick.Controls 1.0; SpinBox { id: spinbox;" + + "maximumValue: 2000; value: 1000; implicitWidth:80}", + container, '') + compare(spinbox.value, 1000); + + spinbox = Qt.createQmlObject('import QtQuick.Controls 1.0; SpinBox { minimumValue: -1000 ; value:-1000}', + container, '') + compare(spinbox.value, -1000); + } + function test_ImplicitSize() // Verify if we correctly grow and shrink depending on contents { var spinbox = Qt.createQmlObject('import QtQuick.Controls 1.0; SpinBox {}', container, '') |