From 290d75d734f219efd247c98e9e395dcdefe55e5c Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> Date: Tue, 28 Oct 2014 18:30:08 +0100 Subject: [PATCH] testbench: Fix propertyMap type, move update out of loop Change-Id: If109280bca207d0d5d7bd43964f5aaec9df553d3 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com> Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com> --- tests/manual/testbench/main.qml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/manual/testbench/main.qml b/tests/manual/testbench/main.qml index 65e663796..479637ee0 100644 --- a/tests/manual/testbench/main.qml +++ b/tests/manual/testbench/main.qml @@ -51,7 +51,7 @@ ApplicationWindow { property bool ignoreUpdate: false onPropertyChanged: container.resetSize() - property var propertyMap: [] + property var propertyMap: ({}) property SpinBox widthControl property SpinBox heightControl @@ -175,8 +175,8 @@ ApplicationWindow { customStyle.checked = false if (status == Loader.Ready) { - propertyMap = [] - var arr = new Array + propertyMap = {} + var arr = {} for (var prop in item) { @@ -391,9 +391,9 @@ ApplicationWindow { arr[typeName].push({name: prop , result: val, typeString: typeName, layoutComponent: layout, enumModel: enumModelData}) } } - propertyMap = arr; - container.resetSize(); } + propertyMap = arr; + container.resetSize(); } } -- GitLab