forked from qt-creator/qt-creator
QMake: Make signalling of parsing state more robust
Move the emitParsingStarted into a location that is called from both methods that had it before. Also add an QTC_ASSERT into incrementPending, which is triggered by the qmake parsing code directly. If something went wrong before, then the signal will be sent anyway and in the right sequence -- although the start signal is a bit late at that point. Task-number: QTCREATORBUG-20203 Change-Id: I64611e471d1e4959d5cfe0118223594a04238433 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -421,7 +421,6 @@ void QmakeProject::scheduleAsyncUpdate(QmakeProFile *file, QmakeProFile::AsyncUp
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
emitParsingStarted();
|
|
||||||
file->setParseInProgressRecursive(true);
|
file->setParseInProgressRecursive(true);
|
||||||
setAllBuildConfigurationsEnabled(false);
|
setAllBuildConfigurationsEnabled(false);
|
||||||
|
|
||||||
@@ -478,7 +477,6 @@ void QmakeProject::scheduleAsyncUpdate(QmakeProFile::AsyncUpdateDelay delay)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
emitParsingStarted();
|
|
||||||
rootProFile()->setParseInProgressRecursive(true);
|
rootProFile()->setParseInProgressRecursive(true);
|
||||||
setAllBuildConfigurationsEnabled(false);
|
setAllBuildConfigurationsEnabled(false);
|
||||||
|
|
||||||
@@ -501,12 +499,15 @@ void QmakeProject::startAsyncTimer(QmakeProFile::AsyncUpdateDelay delay)
|
|||||||
m_asyncUpdateTimer.stop();
|
m_asyncUpdateTimer.stop();
|
||||||
m_asyncUpdateTimer.setInterval(qMin(m_asyncUpdateTimer.interval(),
|
m_asyncUpdateTimer.setInterval(qMin(m_asyncUpdateTimer.interval(),
|
||||||
delay == QmakeProFile::ParseLater ? UPDATE_INTERVAL : 0));
|
delay == QmakeProFile::ParseLater ? UPDATE_INTERVAL : 0));
|
||||||
|
if (!isParsing())
|
||||||
|
emitParsingStarted();
|
||||||
m_asyncUpdateTimer.start();
|
m_asyncUpdateTimer.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmakeProject::incrementPendingEvaluateFutures()
|
void QmakeProject::incrementPendingEvaluateFutures()
|
||||||
{
|
{
|
||||||
++m_pendingEvaluateFuturesCount;
|
++m_pendingEvaluateFuturesCount;
|
||||||
|
QTC_ASSERT(isParsing(), emitParsingStarted());
|
||||||
m_asyncUpdateFutureInterface->setProgressRange(m_asyncUpdateFutureInterface->progressMinimum(),
|
m_asyncUpdateFutureInterface->setProgressRange(m_asyncUpdateFutureInterface->progressMinimum(),
|
||||||
m_asyncUpdateFutureInterface->progressMaximum() + 1);
|
m_asyncUpdateFutureInterface->progressMaximum() + 1);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user