summaryrefslogtreecommitdiff
path: root/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2016-09-06 13:36:02 +0200
committerMarc Mutz <marc.mutz@kdab.com>2016-09-23 10:14:38 +0000
commitc2b958dcc02730e54bbaa271d21f88ccb5e6945c (patch)
tree6be6d335630e33b7c0c536ad191a26f4695fb743 /tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp
parent52f416f7889c2e63b901eeca07f2c5bda7b27b93 (diff)
downloadqtscript-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/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp')
-rw-r--r--tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp b/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp
index 3ce2397..316b34b 100644
--- a/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp
+++ b/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp
@@ -181,8 +181,8 @@ void tst_QScriptJSTestSuite::runTestFunction(int testIndex)
QString suiteShellPath = testSuiteDir.absoluteFilePath("shell.js");
QString suiteShellContents = readFile(suiteShellPath);
- QFileInfoList testFileInfos = subSuiteDir.entryInfoList(QStringList() << "*.js", QDir::Files);
- foreach (QFileInfo tfi, testFileInfos) {
+ const QFileInfoList testFileInfos = subSuiteDir.entryInfoList(QStringList() << "*.js", QDir::Files);
+ for (const QFileInfo &tfi : testFileInfos) {
if ((tfi.fileName() == "shell.js") || (tfi.fileName() == "browser.js"))
continue;
@@ -322,12 +322,12 @@ tst_QScriptJSTestSuite::tst_QScriptJSTestSuite()
// don't execute any tests on slow machines
#if !defined(Q_OS_IRIX)
// do all the test suites
- QFileInfoList testSuiteDirInfos = testsDir.entryInfoList(QDir::AllDirs | QDir::NoDotAndDotDot);
- foreach (QFileInfo tsdi, testSuiteDirInfos) {
+ const QFileInfoList testSuiteDirInfos = testsDir.entryInfoList(QDir::AllDirs | QDir::NoDotAndDotDot);
+ for (const QFileInfo &tsdi : testSuiteDirInfos) {
QDir testSuiteDir(tsdi.absoluteFilePath());
// do all the dirs in the test suite
- QFileInfoList subSuiteDirInfos = testSuiteDir.entryInfoList(QDir::AllDirs | QDir::NoDotAndDotDot);
- foreach (QFileInfo ssdi, subSuiteDirInfos) {
+ const QFileInfoList subSuiteDirInfos = testSuiteDir.entryInfoList(QDir::AllDirs | QDir::NoDotAndDotDot);
+ for (const QFileInfo &ssdi : subSuiteDirInfos) {
subSuitePaths.append(ssdi.absoluteFilePath());
QString function = QString::fromLatin1("%0/%1")
.arg(testSuiteDir.dirName()).arg(ssdi.fileName());