diff --git a/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp b/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp index 3bed8f42e95..fd059a23f43 100644 --- a/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp @@ -1189,7 +1189,7 @@ QmakeProFile::~QmakeProFile() m_parseFutureWatcher->cancel(); m_parseFutureWatcher->waitForFinished(); if (m_readerExact) - applyAsyncEvaluate(); + applyAsyncEvaluate(false); delete m_parseFutureWatcher; } cleanupProFileReaders(); @@ -1198,8 +1198,9 @@ QmakeProFile::~QmakeProFile() void QmakeProFile::setupFutureWatcher() { m_parseFutureWatcher = new QFutureWatcher; - QObject::connect(m_parseFutureWatcher, &QFutureWatcherBase::finished, - [this](){ applyAsyncEvaluate(); }); + QObject::connect(m_parseFutureWatcher, &QFutureWatcherBase::finished, [this]() { + applyAsyncEvaluate(true); + }); } bool QmakeProFile::isParent(QmakeProFile *node) @@ -1643,9 +1644,9 @@ void QmakeProFile::asyncEvaluate(QFutureInterface &fi, QmakeE fi.reportResult(evalResult); } -void QmakeProFile::applyAsyncEvaluate() +void QmakeProFile::applyAsyncEvaluate(bool apply) { - if (m_parseFutureWatcher->isFinished()) + if (apply) applyEvaluate(m_parseFutureWatcher->result()); m_buildSystem->decrementPendingEvaluateFutures(); } diff --git a/src/plugins/qmakeprojectmanager/qmakeparsernodes.h b/src/plugins/qmakeprojectmanager/qmakeparsernodes.h index 836c04e5890..9d1121c2fb0 100644 --- a/src/plugins/qmakeprojectmanager/qmakeparsernodes.h +++ b/src/plugins/qmakeprojectmanager/qmakeparsernodes.h @@ -352,7 +352,7 @@ private: void setParseInProgress(bool b); void setValidParseRecursive(bool b); - void applyAsyncEvaluate(); + void applyAsyncEvaluate(bool apply); void setupReader(); Internal::QmakeEvalInput evalInput() const;