CppEditor: Acknowledge the existence of clangd

Stop pretending to be super generic. Instead, let interested code know
directly whether a document is under clangd's control.
This saves code and makes the logic easier to understand.

Change-Id: Ia19d0ec6c4e83926379a7d17ca53896bee3a50e1
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2022-05-10 17:21:59 +02:00
parent c1fcaa2877
commit 52959ce472
9 changed files with 10 additions and 37 deletions

View File

@@ -253,18 +253,7 @@ std::unique_ptr<CppEditor::AbstractOverviewModel> ClangModelManagerSupport::crea
return {};
}
bool ClangModelManagerSupport::supportsOutline(const TextEditor::TextDocument *document) const
{
return !clientForFile(document->filePath());
}
bool ClangModelManagerSupport::supportsLocalUses(const TextEditor::TextDocument *document) const
{
return !clientForFile(document->filePath());
}
bool ClangModelManagerSupport::hasSpecialHoverHandler(
const TextEditor::TextDocument *document) const
bool ClangModelManagerSupport::usesClangd(const TextEditor::TextDocument *document) const
{
return clientForFile(document->filePath());
}