From: Debian Qt/KDE Maintainers Date: Fri, 27 Jul 2018 01:09:16 +0000 (+0100) Subject: testcase_array_iteration X-Git-Tag: archive/raspbian/5.11.1-4+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b86768ed6ffcf8382abbc6f53de1da6d6f6c1b22;p=qtdeclarative-opensource-src.git testcase_array_iteration Gbp-Pq: Name testcase_array_iteration.patch --- diff --git a/src/imports/testlib/TestCase.qml b/src/imports/testlib/TestCase.qml index 8e9b01644..31ff02ff8 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)