summaryrefslogtreecommitdiffstats
path: root/tests/auto/tools/qmake/testcompiler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/tools/qmake/testcompiler.cpp')
-rw-r--r--tests/auto/tools/qmake/testcompiler.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/auto/tools/qmake/testcompiler.cpp b/tests/auto/tools/qmake/testcompiler.cpp
index b092e23126..23d9b76187 100644
--- a/tests/auto/tools/qmake/testcompiler.cpp
+++ b/tests/auto/tools/qmake/testcompiler.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "testcompiler.h"
@@ -104,7 +104,8 @@ static inline QStringList systemEnvironment()
#ifdef Q_OS_WIN
static QStringList result;
if (result.isEmpty()) {
- foreach (const QString &variable, QProcess::systemEnvironment()) {
+ const auto env = QProcess::systemEnvironment();
+ for (const QString &variable : env) {
if (variable.startsWith(QStringLiteral("MAKEFLAGS="), Qt::CaseInsensitive)) {
qWarning("Removing environment setting '%s'", qPrintable(variable));
} else {
@@ -123,7 +124,7 @@ bool TestCompiler::runCommand(const QString &cmd, const QStringList &args, bool
QString dbg = cmd;
if (dbg.contains(' '))
dbg.prepend('"').append('"');
- foreach (QString arg, args) {
+ for (QString arg : args) {
if (arg.contains(' '))
arg.prepend('"').append('"');
dbg.append(' ').append(arg);