forked from qt-creator/qt-creator
ClangCodeModel: Respect settings
If the user disables usage of clangd and opens a cpp file without a project we still tried to set up the fallback clangd. Silences a soft assert. Change-Id: I753ce2eddb00b344b109ba4ff3da61a849767a79 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -768,6 +768,8 @@ void ClangModelManagerSupport::onEditorOpened(IEditor *editor)
|
||||
|
||||
Project * project = ProjectManager::projectForFile(document->filePath());
|
||||
const ClangdSettings settings(ClangdProjectSettings(project).settings());
|
||||
if (!settings.useClangd())
|
||||
return;
|
||||
if (!settings.sizeIsOkay(textDocument->filePath()))
|
||||
return;
|
||||
if (sessionModeEnabled())
|
||||
|
Reference in New Issue
Block a user