From: Debian Qt/KDE Maintainers Date: Thu, 15 Nov 2018 09:53:51 +0000 (+0000) Subject: testcase_array_iteration X-Git-Tag: archive/raspbian/5.14.2+dfsg-3+rpi1~3^2^2^2^2^2^2^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=3933d3a3d5bb6fc382f0fcf23a1ad2545fecaf6b;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 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)