forked from qt-creator/qt-creator
QbsProject: Cancel (last) C++ indexer before new code model update
...otherwise we might end up having multiple indexer running for
different (build) configurations.
Reproduce e.g. with:
(1) Open a project (adds "Parsing C/C++ files" progress notification)
(2) Trigger build of project
(3) While it is still building, switch between e.g. Release and Debug
build configuration
(4) Once the build is finished, a new code model update is pushed but
the indexer for the old configuration might still run
Change-Id: I685d0b3eeeb43ba5923c6af0e6b16aee6609419b
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com>
This commit is contained in:
committed by
Fawzi Mohamed
parent
1fcba8df5f
commit
ba60b512e5
@@ -780,6 +780,7 @@ void QbsProject::updateCppCodeModel()
|
||||
QtSupport::UiCodeModelManager::update(this, uiFiles);
|
||||
|
||||
// Update the code model
|
||||
m_codeModelFuture.cancel();
|
||||
m_codeModelFuture = modelmanager->updateProjectInfo(pinfo);
|
||||
m_codeModelProjectInfo = modelmanager->projectInfo(this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user