forked from qt-creator/qt-creator
qmake: eradicate Q_FOREACH loops [already const]
(or trivially marked const) ... by replacing them with C++11 range-for loops. Change-Id: I1522e220a57ecb1c5ee0d4281233b3c3931a2ff8 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> (cherry picked from qtbase/d9229d849f44cf94e4ee19fac390811b474127d2) Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
This commit is contained in:
committed by
Oswald Buddenhagen
parent
1a4f0f1dad
commit
d882ae9cb7
@@ -1794,7 +1794,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateConditional(
|
||||
QMakeEvaluator::VisitReturn QMakeEvaluator::checkRequirements(const ProStringList &deps)
|
||||
{
|
||||
ProStringList &failed = valuesRef(ProKey("QMAKE_FAILED_REQUIREMENTS"));
|
||||
foreach (const ProString &dep, deps) {
|
||||
for (const ProString &dep : deps) {
|
||||
VisitReturn vr = evaluateConditional(dep.toQString(), m_current.pro->fileName(), m_current.line);
|
||||
if (vr == ReturnError)
|
||||
return ReturnError;
|
||||
@@ -1918,9 +1918,9 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateFileChecked(
|
||||
{
|
||||
if (fileName.isEmpty())
|
||||
return ReturnFalse;
|
||||
QMakeEvaluator *ref = this;
|
||||
const QMakeEvaluator *ref = this;
|
||||
do {
|
||||
foreach (const ProFile *pf, ref->m_profileStack)
|
||||
for (const ProFile *pf : ref->m_profileStack)
|
||||
if (pf->fileName() == fileName) {
|
||||
evalError(fL1S("Circular inclusion of %1.").arg(fileName));
|
||||
return ReturnFalse;
|
||||
@@ -2121,7 +2121,7 @@ QString QMakeEvaluator::formatValueList(const ProStringList &vals, bool commas)
|
||||
{
|
||||
QString ret;
|
||||
|
||||
foreach (const ProString &str, vals) {
|
||||
for (const ProString &str : vals) {
|
||||
if (!ret.isEmpty()) {
|
||||
if (commas)
|
||||
ret += QLatin1Char(',');
|
||||
@@ -2136,7 +2136,7 @@ QString QMakeEvaluator::formatValueListList(const QList<ProStringList> &lists)
|
||||
{
|
||||
QString ret;
|
||||
|
||||
foreach (const ProStringList &list, lists) {
|
||||
for (const ProStringList &list : lists) {
|
||||
if (!ret.isEmpty())
|
||||
ret += QLatin1String(", ");
|
||||
ret += formatValueList(list);
|
||||
|
||||
Reference in New Issue
Block a user