forked from qt-creator/qt-creator
CppEditor: Make sure fallback project part is up to date
... with regards to the session include paths.
Amends 0636238429
.
Fixes: QTCREATORBUG-26323
Change-Id: I8e2cd5f5e87d9dc3d2df3f943e13599bc7139768
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -483,10 +483,6 @@ void ClangModelManagerSupport::onEditorOpened(Core::IEditor *editor)
|
||||
|
||||
// TODO: Ensure that not fully loaded documents are updated?
|
||||
|
||||
// TODO: If the file does not belong to any project and it is a header file,
|
||||
// it might make sense to check whether the file is included by any file
|
||||
// that does belong to a project, and if so, use the respective client
|
||||
// instead. Is this feasible?
|
||||
ProjectExplorer::Project * const project
|
||||
= ProjectExplorer::SessionManager::projectForFile(document->filePath());
|
||||
if (ClangdClient * const client = clientForProject(project))
|
||||
|
@@ -694,6 +694,10 @@ CppModelManager::CppModelManager()
|
||||
|
||||
connect(KitManager::instance(), &KitManager::kitsChanged, this,
|
||||
&CppModelManager::setupFallbackProjectPart);
|
||||
connect(this, &CppModelManager::projectPartsRemoved, this,
|
||||
&CppModelManager::setupFallbackProjectPart);
|
||||
connect(this, &CppModelManager::projectPartsUpdated, this,
|
||||
&CppModelManager::setupFallbackProjectPart);
|
||||
setupFallbackProjectPart();
|
||||
|
||||
qRegisterMetaType<CPlusPlus::Document::Ptr>("CPlusPlus::Document::Ptr");
|
||||
|
Reference in New Issue
Block a user