From 69501f5eb15020e653964e0dfd0b80e1227ba993 Mon Sep 17 00:00:00 2001 From: Debian Qt/KDE Maintainers Date: Mon, 15 Oct 2018 19:16:04 +0100 Subject: [PATCH] testcase_array_iteration Gbp-Pq: Name testcase_array_iteration.patch --- src/imports/testlib/TestCase.qml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/imports/testlib/TestCase.qml b/src/imports/testlib/TestCase.qml index 77b644d3f..ceb0d0ae6 100644 --- a/src/imports/testlib/TestCase.qml +++ b/src/imports/testlib/TestCase.qml @@ -1817,7 +1817,7 @@ Item { testList.sort() } var checkNames = (functionsToRun.length > 0) - for (var index in testList) { + for (var index = 0; index < testList.length; ++index) { var prop = testList[index] var datafunc = prop + "_data" var isBenchmark = (prop.indexOf("benchmark_") == 0) @@ -1837,11 +1837,11 @@ Item { var table = qtest_testCaseResult var haveData = false qtest_results.initTestTable() - for (var index in table) { + for (var rowIndex in table) { haveData = true - var row = table[index] + var row = table[parseInt(rowIndex)] if (!row.tag) - row.tag = "row " + index // Must have something + row.tag = "row " + rowIndex // Must have something qtest_results.dataTag = row.tag if (isBenchmark) qtest_runBenchmarkFunction(prop, row) -- 2.30.2