forked from qt-creator/qt-creator
Qmake: Fix detection of successful parsing run
Do not report success of a qmake parsing run based on every .pro-file having reported success. Take the top-level .pro-file's success value instead. This fixes e.g. Creator, which has some .pro-files that error out in some conditions. Task-number: QTCREATORBUG-18992 Change-Id: I888141e723da84fb780ccd84c86acc25d03f5f28 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -1489,7 +1489,7 @@ void QmakeProFile::asyncEvaluate(QFutureInterface<QmakeEvalResult *> &fi, QmakeE
|
|||||||
void QmakeProFile::applyAsyncEvaluate()
|
void QmakeProFile::applyAsyncEvaluate()
|
||||||
{
|
{
|
||||||
applyEvaluate(m_parseFutureWatcher.result());
|
applyEvaluate(m_parseFutureWatcher.result());
|
||||||
m_project->decrementPendingEvaluateFutures(validParse());
|
m_project->decrementPendingEvaluateFutures();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool sortByParserNodes(Node *a, Node *b)
|
bool sortByParserNodes(Node *a, Node *b)
|
||||||
|
|||||||
@@ -500,24 +500,20 @@ void QmakeProject::startAsyncTimer(QmakeProFile::AsyncUpdateDelay delay)
|
|||||||
void QmakeProject::incrementPendingEvaluateFutures()
|
void QmakeProject::incrementPendingEvaluateFutures()
|
||||||
{
|
{
|
||||||
++m_pendingEvaluateFuturesCount;
|
++m_pendingEvaluateFuturesCount;
|
||||||
if (m_pendingEvaluateFuturesCount == 1)
|
|
||||||
m_totalEvaluationSuccess = true;
|
|
||||||
m_asyncUpdateFutureInterface->setProgressRange(m_asyncUpdateFutureInterface->progressMinimum(),
|
m_asyncUpdateFutureInterface->setProgressRange(m_asyncUpdateFutureInterface->progressMinimum(),
|
||||||
m_asyncUpdateFutureInterface->progressMaximum() + 1);
|
m_asyncUpdateFutureInterface->progressMaximum() + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmakeProject::decrementPendingEvaluateFutures(bool success)
|
void QmakeProject::decrementPendingEvaluateFutures()
|
||||||
{
|
{
|
||||||
--m_pendingEvaluateFuturesCount;
|
--m_pendingEvaluateFuturesCount;
|
||||||
|
|
||||||
m_totalEvaluationSuccess = m_totalEvaluationSuccess && success;
|
|
||||||
|
|
||||||
m_asyncUpdateFutureInterface->setProgressValue(m_asyncUpdateFutureInterface->progressValue() + 1);
|
m_asyncUpdateFutureInterface->setProgressValue(m_asyncUpdateFutureInterface->progressValue() + 1);
|
||||||
if (m_pendingEvaluateFuturesCount == 0) {
|
if (m_pendingEvaluateFuturesCount == 0) {
|
||||||
// We are done!
|
// We are done!
|
||||||
setRootProjectNode(QmakeNodeTreeBuilder::buildTree(this));
|
setRootProjectNode(QmakeNodeTreeBuilder::buildTree(this));
|
||||||
|
|
||||||
if (!m_totalEvaluationSuccess)
|
if (!m_rootProFile->validParse())
|
||||||
m_asyncUpdateFutureInterface->reportCanceled();
|
m_asyncUpdateFutureInterface->reportCanceled();
|
||||||
|
|
||||||
m_asyncUpdateFutureInterface->reportFinished();
|
m_asyncUpdateFutureInterface->reportFinished();
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ public:
|
|||||||
/// \internal
|
/// \internal
|
||||||
void incrementPendingEvaluateFutures();
|
void incrementPendingEvaluateFutures();
|
||||||
/// \internal
|
/// \internal
|
||||||
void decrementPendingEvaluateFutures(bool success);
|
void decrementPendingEvaluateFutures();
|
||||||
/// \internal
|
/// \internal
|
||||||
bool wasEvaluateCanceled();
|
bool wasEvaluateCanceled();
|
||||||
|
|
||||||
@@ -186,7 +186,6 @@ private:
|
|||||||
// cached data during project rescan
|
// cached data during project rescan
|
||||||
QMakeGlobals *m_qmakeGlobals = nullptr;
|
QMakeGlobals *m_qmakeGlobals = nullptr;
|
||||||
int m_qmakeGlobalsRefCnt = 0;
|
int m_qmakeGlobalsRefCnt = 0;
|
||||||
bool m_totalEvaluationSuccess = false;
|
|
||||||
|
|
||||||
QString m_qmakeSysroot;
|
QString m_qmakeSysroot;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user