CMake: Fix race between persisting cmake configuration and parsing

First make sure the configuration is reset: This makes sure the correct
branch is taken in parse().

Then trigger parsing through the event loop so that its signals will
definitely arrive after persistCMakeState has returned.

Task-number: QTCREATORBUG-16258
Change-Id: I103ca6b6119ec70c99828d883d728a8bb97fd6bf
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
Tobias Hunger
2016-05-23 11:38:06 +02:00
parent 5bc0d12c6d
commit 1f7582e86e

View File

@@ -197,7 +197,8 @@ bool BuildDirManager::persistCMakeState()
delete m_tempDir; delete m_tempDir;
m_tempDir = nullptr; m_tempDir = nullptr;
parse(); resetData();
QTimer::singleShot(0, this, &BuildDirManager::parse); // make sure signals only happen afterwards!
return true; return true;
} }