forked from qt-creator/qt-creator
don't declare defeat if only cumulative evaluation fails
it is entirely plausible that the precise evaluation would succeed, while the cumulative would fail due to some serious inaccuracies introduced by it. such problems would be particularly hard to debug, as we suppress error messages from the cumulative parsing, so the user would get a "Giving up" message without any context. Change-Id: I826b3b1d838808464b551e8ee0d7375d239442a3 Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com> Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
committed by
Mitch Curtis
parent
153fe543a8
commit
440c40f534
@@ -1713,17 +1713,13 @@ void QmakeProFileNode::setupReader()
|
||||
|
||||
QmakeProFileNode::EvalResult QmakeProFileNode::evaluate()
|
||||
{
|
||||
EvalResult evalResult = EvalOk;
|
||||
if (ProFile *pro = m_readerExact->parsedProFile(m_projectFilePath)) {
|
||||
if (!m_readerExact->accept(pro, QMakeEvaluator::LoadAll))
|
||||
evalResult = EvalPartial;
|
||||
if (!m_readerCumulative->accept(pro, QMakeEvaluator::LoadPreFiles))
|
||||
evalResult = EvalFail;
|
||||
bool exactOk = m_readerExact->accept(pro, QMakeEvaluator::LoadAll);
|
||||
bool cumulOk = m_readerCumulative->accept(pro, QMakeEvaluator::LoadPreFiles);
|
||||
pro->deref();
|
||||
} else {
|
||||
evalResult = EvalFail;
|
||||
return exactOk ? EvalOk : cumulOk ? EvalPartial : EvalFail;
|
||||
}
|
||||
return evalResult;
|
||||
return EvalFail;
|
||||
}
|
||||
|
||||
void QmakeProFileNode::asyncEvaluate(QFutureInterface<EvalResult> &fi)
|
||||
|
Reference in New Issue
Block a user