summaryrefslogtreecommitdiffstats
path: root/qmake/generators/win32/msvc_nmake.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2016-01-26 14:38:54 +0100
committerMarc Mutz <marc.mutz@kdab.com>2016-01-28 20:25:18 +0000
commite31541fa6f5f4df64fd44a9a895491c40b8c64b4 (patch)
tree3b49ee58476f6542789d5112dd182d3c2ed1d79a /qmake/generators/win32/msvc_nmake.cpp
parent8d7e913248aa1cad23447668d98911bba01faf4b (diff)
qmake: eradicate Q_FOREACH loops [needing qAsConst()]
... by replacing them with C++11 range-for loops. To avoid detaches of these mutable Qt containers, wrap the container in qAsConst(). Change-Id: If086bea06fe26232a7bb99fad8b09fce4dc74c27 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'qmake/generators/win32/msvc_nmake.cpp')
-rw-r--r--qmake/generators/win32/msvc_nmake.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp
index 91b184b55f..db0d2cf9c5 100644
--- a/qmake/generators/win32/msvc_nmake.cpp
+++ b/qmake/generators/win32/msvc_nmake.cpp
@@ -427,9 +427,9 @@ QStringList NmakeMakefileGenerator::sourceFilesForImplicitRulesFilter()
{
QStringList filter;
const QChar wildcard = QLatin1Char('*');
- foreach (const QString &ext, Option::c_ext)
+ for (const QString &ext : qAsConst(Option::c_ext))
filter << wildcard + ext;
- foreach (const QString &ext, Option::cpp_ext)
+ for (const QString &ext : qAsConst(Option::cpp_ext))
filter << wildcard + ext;
return filter;
}
@@ -477,7 +477,7 @@ void NmakeMakefileGenerator::writeImplicitRulesPart(QTextStream &t)
const QStringList sourceFilesFilter = sourceFilesForImplicitRulesFilter();
QStringList fixifiedSourceDirs = fileFixify(source_directories.toList(), FileFixifyAbsolute);
fixifiedSourceDirs.removeDuplicates();
- foreach (const QString &sourceDir, fixifiedSourceDirs) {
+ for (const QString &sourceDir : qAsConst(fixifiedSourceDirs)) {
QDirIterator dit(sourceDir, sourceFilesFilter, QDir::Files | QDir::NoDotAndDotDot);
while (dit.hasNext()) {
dit.next();
@@ -502,7 +502,7 @@ void NmakeMakefileGenerator::writeImplicitRulesPart(QTextStream &t)
project->variables().remove("QMAKE_RUN_CXX");
project->variables().remove("QMAKE_RUN_CC");
- foreach (const QString &sourceDir, source_directories) {
+ for (const QString &sourceDir : qAsConst(source_directories)) {
if (sourceDir.isEmpty())
continue;
QString objDir = var("OBJECTS_DIR");