forked from qt-creator/qt-creator
ClangCodeModel: Prevent indexing with fallback client
There is no project to index. Change-Id: I6d3ad2f894a45e2a7934cfb3c10c525299bfd34b Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -560,7 +560,7 @@ static BaseClientInterface *clientInterface(Project *project, const Utils::FileP
|
||||
{
|
||||
QString indexingOption = "--background-index";
|
||||
const CppEditor::ClangdSettings settings(CppEditor::ClangdProjectSettings(project).settings());
|
||||
if (!settings.indexingEnabled())
|
||||
if (!settings.indexingEnabled() || jsonDbDir.isEmpty())
|
||||
indexingOption += "=0";
|
||||
const QString headerInsertionOption = QString("--header-insertion=")
|
||||
+ (settings.autoIncludeHeaders() ? "iwyu" : "never");
|
||||
|
||||
Reference in New Issue
Block a user