diff options
author | Mitch Curtis <mitch.curtis@digia.com> | 2013-09-17 12:49:23 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-17 13:29:06 +0200 |
commit | ac39d220f2989286d871a16f064f4de69098f167 (patch) | |
tree | b05c3b2ca2f5c752f74295c9eab9120c62407fdf /tests/auto/controls/data/tst_spinbox.qml | |
parent | 545913c4c43dd004fae6353978b3d08b4d712900 (diff) | |
download | qtquickcontrols-ac39d220f2989286d871a16f064f4de69098f167.tar.gz |
Don't emit onValueChanged during construction of SpinBox.
Task-number: QTBUG-33504
Change-Id: I9860be6524ec82274f7d256d65aaef3f7657a09b
Reviewed-by: J-P Nurmi <jpnurmi@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 | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_spinbox.qml b/tests/auto/controls/data/tst_spinbox.qml index 738be910..df7a5eb1 100644 --- a/tests/auto/controls/data/tst_spinbox.qml +++ b/tests/auto/controls/data/tst_spinbox.qml @@ -466,6 +466,28 @@ Item { spinbox.destroy() } + function test_construction() { + // onValueChanged should not be emitted during construction. + var root = Qt.createQmlObject(" + import QtQuick 2.1 + import QtQuick.Controls 1.1 + Item { + id: root + property bool ok: true + Item { + SpinBox { + value: 42 + onValueChanged: { if (check === null) root.ok = false; } + } + } + Rectangle { + id: check + } + }", + container, ""); + verify(root.ok); + } + function setCoordinates(item) { mainCoord.x = item.x + 1 |