From b7152d825d614267df9a2c4dbded31b2fd20c353 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 8 Jun 2012 18:46:07 +0200 Subject: [PATCH] use a separate evaluator for preliminary cache load it's cleaner this way Change-Id: I9bb5dea8147a94f4529e77c663fbf59e272409f5 Reviewed-by: Daniel Teske Reviewed-by: Oswald Buddenhagen --- src/shared/proparser/qmakeevaluator.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/shared/proparser/qmakeevaluator.cpp b/src/shared/proparser/qmakeevaluator.cpp index e697cddb792..696ced98f3a 100644 --- a/src/shared/proparser/qmakeevaluator.cpp +++ b/src/shared/proparser/qmakeevaluator.cpp @@ -841,14 +841,13 @@ void QMakeEvaluator::prepareProject() } } if (!qmake_cache.isEmpty()) { - ProValueMap cache_valuemap; - if (evaluateFileInto(qmake_cache, QMakeHandler::EvalConfigFile, - &cache_valuemap, EvalProOnly)) { - if (m_option->qmakespec.isEmpty()) { - const ProStringList &vals = cache_valuemap.value(ProString("QMAKESPEC")); - if (!vals.isEmpty()) - m_option->qmakespec = vals.first().toQString(); - } + QMakeEvaluator evaluator(m_option, m_parser, m_handler); +#ifdef PROEVALUATOR_CUMULATIVE + evaluator.m_cumulative = false; +#endif + if (evaluator.evaluateFileDirect(qmake_cache, QMakeHandler::EvalConfigFile, LoadProOnly)) { + if (m_option->qmakespec.isEmpty()) + m_option->qmakespec = evaluator.first(ProString("QMAKESPEC")).toQString(); } else { qmake_cache.clear(); }