forked from qt-creator/qt-creator
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 <david.schulz@qt.io>
This commit is contained in:
@@ -30,9 +30,6 @@ namespace ClangCodeModel {
|
||||
ClangEditorDocumentParser::ClangEditorDocumentParser(const QString &filePath)
|
||||
: BaseEditorDocumentParser(filePath)
|
||||
{
|
||||
BaseEditorDocumentParser::Configuration config = configuration();
|
||||
config.stickToPreviousProjectPart = false;
|
||||
setConfiguration(config);
|
||||
}
|
||||
|
||||
void ClangEditorDocumentParser::updateImpl(const QFutureInterface<void> &,
|
||||
@@ -41,7 +38,7 @@ void ClangEditorDocumentParser::updateImpl(const QFutureInterface<void> &,
|
||||
State state_ = state();
|
||||
state_.projectPartInfo = determineProjectPart(filePath(),
|
||||
configuration(),
|
||||
state_,
|
||||
state_.projectPartInfo,
|
||||
updateParams.activeProject,
|
||||
updateParams.languagePreference,
|
||||
updateParams.hasActiveProjectChanged);
|
||||
|
||||
Reference in New Issue
Block a user