1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
Description: fix arrays iteration to work around QTBUG-61579
Author: Dmitry Shachnev <mitya57@ubuntu.com>
Bug: https://bugreports.qt.io/browse/QTBUG-61579
Forwarded: no
Last-Update: 2017-06-22
--- 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)
|