diff options
author | J-P Nurmi <jpnurmi@theqtcompany.com> | 2016-04-17 19:28:17 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-04-18 09:48:40 +0000 |
commit | 392d520ade77e6fb941e54fdaa8b23d34c745a8b (patch) | |
tree | 46991b006ef4da4227a79b18f5b72799ec3efcee /tests/auto/controls/data/tst_combobox.qml | |
parent | 34c43df77dbd29eeb7e9ea34b23cad7fb80c735c (diff) |
ComboBox: respect currentIndex:-1
Don't override explicitly set current index in Component.onCompleted.
Task-number: QTBUG-52615
Change-Id: If5ce4ec1db29f8ac94d457d297910d61fb0b8a18
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'tests/auto/controls/data/tst_combobox.qml')
-rw-r--r-- | tests/auto/controls/data/tst_combobox.qml | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_combobox.qml b/tests/auto/controls/data/tst_combobox.qml index ef46172f..c400d912 100644 --- a/tests/auto/controls/data/tst_combobox.qml +++ b/tests/auto/controls/data/tst_combobox.qml @@ -792,4 +792,14 @@ TestCase { loader.destroy() } + + // QTBUG-52615 + function test_currentIndex() { + var control = comboBox.createObject(testCase, {currentIndex: -1, model: 3}) + verify(control) + + compare(control.currentIndex, -1) + + control.destroy() + } } |