diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2016-09-06 13:36:02 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2016-09-23 10:14:38 +0000 |
commit | c2b958dcc02730e54bbaa271d21f88ccb5e6945c (patch) | |
tree | 6be6d335630e33b7c0c536ad191a26f4695fb743 /tests/benchmarks/script/context2d | |
parent | 52f416f7889c2e63b901eeca07f2c5bda7b27b93 (diff) | |
download | qtscript-c2b958dcc02730e54bbaa271d21f88ccb5e6945c.tar.gz |
Eradicate Q_FOREACH loops and mark the module as Q_FOREACH-free
Change-Id: I13a4ce5c268da2b97cbae6612d240398b17186ef
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/benchmarks/script/context2d')
-rw-r--r-- | tests/benchmarks/script/context2d/tst_context2d.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/benchmarks/script/context2d/tst_context2d.cpp b/tests/benchmarks/script/context2d/tst_context2d.cpp index f89a395..740eafc 100644 --- a/tests/benchmarks/script/context2d/tst_context2d.cpp +++ b/tests/benchmarks/script/context2d/tst_context2d.cpp @@ -104,8 +104,8 @@ void tst_Context2D::newEnvironment() void tst_Context2D::singleExecution_data() { QTest::addColumn<QString>("testName"); - QFileInfoList testFileInfos = testsDir.entryInfoList(QStringList() << "*.js", QDir::Files); - foreach (QFileInfo tfi, testFileInfos) { + const QFileInfoList testFileInfos = testsDir.entryInfoList(QStringList() << "*.js", QDir::Files); + for (const QFileInfo &tfi : testFileInfos) { QString name = tfi.baseName(); QTest::newRow(name.toLatin1().constData()) << name; } @@ -136,8 +136,8 @@ void tst_Context2D::repeatedExecution_data() // us to observe potential effects of profiling-based JIT optimizations. QTest::addColumn<QString>("testName"); QTest::addColumn<QString>("script"); - QFileInfoList testFileInfos = testsDir.entryInfoList(QStringList() << "*.js", QDir::Files); - foreach (QFileInfo tfi, testFileInfos) { + const QFileInfoList testFileInfos = testsDir.entryInfoList(QStringList() << "*.js", QDir::Files); + for (const QFileInfo &tfi : testFileInfos) { QString script = readFile(tfi.absoluteFilePath()); QString name = tfi.baseName(); newEnvironment(); |