Commit ba60b512 authored by Nikolai Kosjar's avatar Nikolai Kosjar Committed by Fawzi Mohamed

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: default avatarChristian Kandeler <christian.kandeler@digia.com>
Reviewed-by: default avatarFawzi Mohamed <fawzi.mohamed@theqtcompany.com>
parent 1fcba8df
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment