forked from qt-creator/qt-creator
QmakeProjectManager: Fix missing run button activation
The problem could be reproduced as follows: - open any bigger qmake based project (e.g. QtCreator) - de-activate all kits - activate one kit - wait until the first parse (e.g. Debug build finished) - switch to Profile, and toggle the Shadow build button The toggling re-starts the parsing. The parse guard will not be released in decrementPendingEvaluateFutures() (arguably correct as the parsing as a whole is not done). On enteringing incrementPendingEvaluateFuture() due to the re-start, the guard still guards the parse, but a new guard is created in guardParsingRun(). As this happens while the build system isParsing() is true, the created parse guard will be "non-guarding". On assigning to m_guard, the original guard object will fire and then be replaced by the non-guarding guard, that never fires again, so the the build system will never have hasParsingData(), which is a condition for the run buttons to activate. As a workaround for people running into this issue in 4.12.0: Select 'Run qmake' from the menu (any subproject suffices), and let it finish. Change-Id: If7a55db56ec67bac2635fb9a745b9aaf6ca6a413 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -500,8 +500,13 @@ void QmakeBuildSystem::startAsyncTimer(QmakeProFile::AsyncUpdateDelay delay)
|
|||||||
|
|
||||||
void QmakeBuildSystem::incrementPendingEvaluateFutures()
|
void QmakeBuildSystem::incrementPendingEvaluateFutures()
|
||||||
{
|
{
|
||||||
if (m_pendingEvaluateFuturesCount == 0)
|
if (m_pendingEvaluateFuturesCount == 0) {
|
||||||
|
// The guard actually might already guard the project if this
|
||||||
|
// here is the re-start of a previously aborted parse due to e.g.
|
||||||
|
// changing build directories while parsing.
|
||||||
|
if (!m_guard.guardsProject())
|
||||||
m_guard = guardParsingRun();
|
m_guard = guardParsingRun();
|
||||||
|
}
|
||||||
++m_pendingEvaluateFuturesCount;
|
++m_pendingEvaluateFuturesCount;
|
||||||
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