diff options
author | Nikolai Kosjar <nikolai.kosjar@qt.io> | 2017-01-17 15:27:31 +0100 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@qt.io> | 2017-01-24 14:41:48 +0000 |
commit | 0b8df41387005156ea73b029f4d9d77f91ce5eb5 (patch) | |
tree | 6b44cb326108dff1c0b37322741aaa3da646fb2b /src/plugins/cpptools/builtineditordocumentparser.cpp | |
parent | 19eaf87ef95a510351557119a955223a4aeea7b3 (diff) | |
download | qt-creator-0b8df41387005156ea73b029f4d9d77f91ce5eb5.tar.gz |
CppTools: Provide hints about chosen project part for editor document
Parse issues can have multiple reasons (invalid kit, not a project file,
actual parse issue) and we should be able to tell them apart. With this
change, we can distinguish between the fallback project part and a
ambiguous project part.
Follow up changes will use this to display more accurate diagnostics.
Change-Id: Icc8767607cc17dc14d6227b07f34e81ba5525a96
Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/cpptools/builtineditordocumentparser.cpp')
-rw-r--r-- | src/plugins/cpptools/builtineditordocumentparser.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/plugins/cpptools/builtineditordocumentparser.cpp b/src/plugins/cpptools/builtineditordocumentparser.cpp index 5243e2a76b..236a95f326 100644 --- a/src/plugins/cpptools/builtineditordocumentparser.cpp +++ b/src/plugins/cpptools/builtineditordocumentparser.cpp @@ -77,19 +77,20 @@ void BuiltinEditorDocumentParser::updateImpl(const QFutureInterface<void> &futur QString projectConfigFile; LanguageFeatures features = LanguageFeatures::defaultFeatures(); - baseState.projectPart = determineProjectPart(filePath(), - baseConfig, - baseState, - updateParams.activeProject, - updateParams.languagePreference, - updateParams.hasActiveProjectChanged); + baseState.projectPartInfo = determineProjectPart(filePath(), + baseConfig, + baseState, + updateParams.activeProject, + updateParams.languagePreference, + updateParams.hasActiveProjectChanged); + emit projectPartInfoUpdated(baseState.projectPartInfo); if (state.forceSnapshotInvalidation) { invalidateSnapshot = true; state.forceSnapshotInvalidation = false; } - if (const ProjectPart::Ptr part = baseState.projectPart) { + if (const ProjectPart::Ptr part = baseState.projectPartInfo.projectPart) { configFile += part->toolchainDefines; configFile += overwrittenToolchainDefines(*part.data()); configFile += part->projectDefines; |