diff options
author | J-P Nurmi <jpnurmi@digia.com> | 2013-03-18 11:21:03 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-18 11:43:03 +0100 |
commit | 68772d7c5eda51f2c97d6f63112ad9682adc256c (patch) | |
tree | 62f381bd127a12a6b7cf11ecbba1b82750643640 | |
parent | 7d40a10e49d1959c0523eab26de348a616596f79 (diff) | |
download | qtquickcontrols-68772d7c5eda51f2c97d6f63112ad9682adc256c.tar.gz |
Update testbench to use ComboBox::currentIndex
Change-Id: Ic4f7a4c8b706b8c1f8f9e784721d74b215ae6419
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
-rw-r--r-- | tests/manual/testbench/content/PropertyLayouts.qml | 6 | ||||
-rw-r--r-- | tests/manual/testbench/main.qml | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/tests/manual/testbench/content/PropertyLayouts.qml b/tests/manual/testbench/content/PropertyLayouts.qml index 3a870e85..c79771a4 100644 --- a/tests/manual/testbench/content/PropertyLayouts.qml +++ b/tests/manual/testbench/content/PropertyLayouts.qml @@ -149,13 +149,13 @@ QtObject { height: 20 width: parent.width model: enumModel - onSelectedIndexChanged: { + onCurrentIndexChanged: { if (!ignoreUpdate) { - loader.item[name] = model.get(selectedIndex).value + loader.item[name] = model.get(currentIndex).value propertyChanged() } } - Component.onCompleted: selectedIndex = getDefaultIndex() + Component.onCompleted: currentIndex = getDefaultIndex() function getDefaultIndex() { for (var index = 0 ; index < model.count ; ++index) { if ( model.get(index).value === result ) diff --git a/tests/manual/testbench/main.qml b/tests/manual/testbench/main.qml index ae0a07c6..0efe00b0 100644 --- a/tests/manual/testbench/main.qml +++ b/tests/manual/testbench/main.qml @@ -72,6 +72,7 @@ ApplicationWindow { id: selector width: 200 model: components.componentModel + textRole: "name" } CheckBox { id: patternCheckBox @@ -151,7 +152,7 @@ ApplicationWindow { Loader { id: loader focus: true - sourceComponent: selector.model.get(selector.selectedIndex).component + sourceComponent: selector.model.get(selector.currentIndex).component anchors.fill: parent PropertyLayouts{ id: layouts } onStatusChanged: { |