forked from qt-creator/qt-creator
CppEditor: Make sure fallback project part is up to date
... with regards to the session include paths. Amends0636238429
. Fixes: QTCREATORBUG-26323 (cherry picked from commit8c86b9bca1
) Change-Id: I972a314db607d0b06859744dec4c83e885be3b5c Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -415,10 +415,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 (Client * const client = clientForProject(project))
|
||||
|
@@ -684,6 +684,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