From ba60b512e599567fad487e5d91741ba51da0b637 Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Thu, 6 Nov 2014 15:45:16 +0100 Subject: [PATCH] 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 Reviewed-by: Fawzi Mohamed --- src/plugins/qbsprojectmanager/qbsproject.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/qbsprojectmanager/qbsproject.cpp b/src/plugins/qbsprojectmanager/qbsproject.cpp index 65e145f15a..18fa330db4 100644 --- a/src/plugins/qbsprojectmanager/qbsproject.cpp +++ b/src/plugins/qbsprojectmanager/qbsproject.cpp @@ -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); } -- GitLab