use a separate evaluator for preliminary cache load

it's cleaner this way

Change-Id: I9bb5dea8147a94f4529e77c663fbf59e272409f5
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
Oswald Buddenhagen
2012-06-08 18:46:07 +02:00
parent 05798f87cb
commit b7152d825d

View File

@@ -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();
}