diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-09-06 23:27:32 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-09-06 23:31:16 +0200 |
commit | 9a9a9bd1144663e2cb74efdd3d3f6d76c72313f9 (patch) | |
tree | 2811ccf99d641b040587716f17be8c59a30e11fe /tests/benchmarks/creationtime/tst_creationtime.cpp | |
parent | 320647bce7d968b5798dfc6946df555a548e3f8f (diff) | |
parent | 86180aed5008779b1b94731d9b4c6b1fdac8f3d3 (diff) |
Merge remote-tracking branch 'origin/5.8' into dev
Change-Id: If097242bfffe435d3b379a73eb6c8f54bed8495b
Diffstat (limited to 'tests/benchmarks/creationtime/tst_creationtime.cpp')
-rw-r--r-- | tests/benchmarks/creationtime/tst_creationtime.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/benchmarks/creationtime/tst_creationtime.cpp b/tests/benchmarks/creationtime/tst_creationtime.cpp index 877cf273..3eec3825 100644 --- a/tests/benchmarks/creationtime/tst_creationtime.cpp +++ b/tests/benchmarks/creationtime/tst_creationtime.cpp @@ -78,11 +78,12 @@ static void addTestRows(QQmlEngine *engine, const QString &sourcePath, const QSt // the engine's import path. This way we can use QQmlComponent to load each QML file // for benchmarking. - QFileInfoList entries = QDir(QQC2_IMPORT_PATH "/" + sourcePath).entryInfoList(QStringList("*.qml"), QDir::Files); - foreach (const QFileInfo &entry, entries) { + const QFileInfoList entries = QDir(QQC2_IMPORT_PATH "/" + sourcePath).entryInfoList(QStringList("*.qml"), QDir::Files); + for (const QFileInfo &entry : entries) { QString name = entry.baseName(); if (!skiplist.contains(name)) { - foreach (const QString &importPath, engine->importPathList()) { + const auto importPathList = engine->importPathList(); + for (const QString &importPath : importPathList) { QString name = entry.dir().dirName() + "/" + entry.fileName(); QString filePath = importPath + "/" + targetPath + "/" + entry.fileName(); if (QFile::exists(filePath)) { |