aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/clangcodemodel/clangeditordocumentparser.cpp
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@qt.io>2017-01-19 12:52:16 +0100
committerNikolai Kosjar <nikolai.kosjar@qt.io>2017-01-26 07:50:11 +0000
commitbddfe21961f59ee471b302da9bc7a5c7ee4f561d (patch)
tree24f3abeaf545e98ce28d1deb7d9f05c98a5f003a /src/plugins/clangcodemodel/clangeditordocumentparser.cpp
parent07f32ef57ab34afc421e217048ce068a5501bb33 (diff)
CppTools: Fix using updated project part
1. Open a project consisting of two subprojects referencing the same source file. 2. Open the source file. 3. Click '#' in the editor toolbar and select the second project (part). 4. Update the project file, e.g. add a define ==> Editor does not reflect the added define This is due to comparing project part pointers. Fix by using the project part id that remains stable across project manager updates. Change-Id: Ifd1a113e55ebe2ecf036cd7caafdbfd6e4cdf415 Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/clangcodemodel/clangeditordocumentparser.cpp')
-rw-r--r--src/plugins/clangcodemodel/clangeditordocumentparser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/clangcodemodel/clangeditordocumentparser.cpp b/src/plugins/clangcodemodel/clangeditordocumentparser.cpp
index 2d1d758272b..9948efcccaf 100644
--- a/src/plugins/clangcodemodel/clangeditordocumentparser.cpp
+++ b/src/plugins/clangcodemodel/clangeditordocumentparser.cpp
@@ -37,7 +37,7 @@ void ClangEditorDocumentParser::updateImpl(const QFutureInterface<void> &,
{
State state_ = state();
state_.projectPartInfo = determineProjectPart(filePath(),
- configuration(),
+ configuration().preferredProjectPartId,
state_.projectPartInfo,
updateParams.activeProject,
updateParams.languagePreference,