CppTools: Fix choosing project part after project open

As long as there are project parts for a source file, always determine
the best project part, instead of trying to stick to the previous one.
This ensures the best project part at all times and simplifies the code.

Change-Id: I25ea3eb43a5a3e6d93688d4b8965f596dc9ae22b
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Nikolai Kosjar
2017-01-19 15:46:40 +01:00
parent bddfe21961
commit 7415964819
14 changed files with 69 additions and 63 deletions

View File

@@ -56,7 +56,7 @@ BaseEditorDocumentProcessor::~BaseEditorDocumentProcessor()
{
}
void BaseEditorDocumentProcessor::run(bool hasActiveProjectChanged)
void BaseEditorDocumentProcessor::run(bool projectsUpdated)
{
const Language languagePreference = codeModelSettings()->interpretAmbigiousHeadersAsCHeaders()
? Language::C
@@ -65,7 +65,7 @@ void BaseEditorDocumentProcessor::run(bool hasActiveProjectChanged)
runImpl({CppModelManager::instance()->workingCopy(),
ProjectExplorer::SessionManager::startupProject(),
languagePreference,
hasActiveProjectChanged});
projectsUpdated});
}
TextEditor::QuickFixOperations