From 07f32ef57ab34afc421e217048ce068a5501bb33 Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Thu, 19 Jan 2017 11:08:13 +0100 Subject: CppTools: Use fallback project part if project is closed ...instead of sticking to the old one. If a project is closed, the editor should reflect that. It also simplifies the code. Change-Id: I9b8a94513d3b06a238cfc4ee60c11c0d0da3d93f Reviewed-by: David Schulz --- src/plugins/cpptools/baseeditordocumentparser.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/plugins/cpptools/baseeditordocumentparser.h') diff --git a/src/plugins/cpptools/baseeditordocumentparser.h b/src/plugins/cpptools/baseeditordocumentparser.h index 1cf71fefc6..627c8c4655 100644 --- a/src/plugins/cpptools/baseeditordocumentparser.h +++ b/src/plugins/cpptools/baseeditordocumentparser.h @@ -47,7 +47,6 @@ public: static Ptr get(const QString &filePath); struct Configuration { - bool stickToPreviousProjectPart = true; bool usePrecompiledHeaders = false; QByteArray editorDefines; ProjectPart::Ptr manuallySetProjectPart; @@ -95,10 +94,9 @@ protected: State state() const; void setState(const State &state); - static ProjectPartInfo determineProjectPart( - const QString &filePath, + static ProjectPartInfo determineProjectPart(const QString &filePath, const Configuration &config, - const State &state, + const ProjectPartInfo ¤tProjectPartInfo, const ProjectExplorer::Project *activeProject, Language languagePreference, bool hasActiveProjectChanged); -- cgit v1.2.1