From 3f3140d38a75b8fdef8742d5fe9345cc3fe359cc Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 26 Jan 2016 14:38:54 +0100 Subject: 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 --- qmake/project.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qmake/project.cpp') diff --git a/qmake/project.cpp b/qmake/project.cpp index 888669d368..3b7f28edbc 100644 --- a/qmake/project.cpp +++ b/qmake/project.cpp @@ -146,7 +146,7 @@ void QMakeProject::dump() const it != m_valuemapStack.first().end(); ++it) { if (!it.key().startsWith('.')) { QString str = it.key() + " ="; - foreach (const ProString &v, it.value()) + for (const ProString &v : it.value()) str += ' ' + formatValue(v); out << str; } -- cgit v1.2.3