diff options
| author | Marc Mutz <marc.mutz@kdab.com> | 2016-01-26 14:38:54 +0100 |
|---|---|---|
| committer | Marc Mutz <marc.mutz@kdab.com> | 2016-01-28 20:25:11 +0000 |
| commit | 3f3140d38a75b8fdef8742d5fe9345cc3fe359cc (patch) | |
| tree | a04eab25759c6340cdda99b13ab0cf89f6fd6eba /qmake/generators/unix/unixmake2.cpp | |
| parent | c9cb20c01a0f3fa93ff9f79fd7ea3f53939497c4 (diff) | |
qmake: eradicate Q_FOREACH loops [const-& returns]
... by replacing them with C++11 range-for loops.
The functions QMakeProject::values(), QMakeMetaInfo::values()
and QHashIterator::value() all return by const-reference,
so they can be passed to range-for without further changes.
Change-Id: Ic3b39ed8ff8cd7a6f287f1aa9d61a1acd67d7aaa
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'qmake/generators/unix/unixmake2.cpp')
| -rw-r--r-- | qmake/generators/unix/unixmake2.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 4e18ea8d42a..c16cedd8a2b 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -988,7 +988,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) ProString header_suffix = project->isActiveConfig("clang_pch_style") ? project->first("QMAKE_PCH_OUTPUT_EXT") : ""; - foreach (const ProString &compiler, project->values("QMAKE_BUILTIN_COMPILERS")) { + for (const ProString &compiler : project->values("QMAKE_BUILTIN_COMPILERS")) { if (project->isEmpty(ProKey("QMAKE_" + compiler + "FLAGS_PRECOMPILE"))) continue; ProString language = project->first(ProKey("QMAKE_LANGUAGE_" + compiler)); @@ -1050,7 +1050,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) if(doPrecompiledHeaders() && !project->isEmpty("PRECOMPILED_HEADER")) { QString pchInput = project->first("PRECOMPILED_HEADER").toQString(); t << "###### Precompiled headers\n"; - foreach (const ProString &compiler, project->values("QMAKE_BUILTIN_COMPILERS")) { + for (const ProString &compiler : project->values("QMAKE_BUILTIN_COMPILERS")) { QString pchFlags = var(ProKey("QMAKE_" + compiler + "FLAGS_PRECOMPILE")); if(pchFlags.isEmpty()) continue; |
