ClangCodeModel: Remove libclang fallback for "follow symbol"

... and "switch between declaration/definition".
It's either clangd or built-in code model now.
Use the opportunity to dissolve the pointless FollowSymbolInterface
class hierarchy, which introduced a confusing parallel inheritance
chain.

Change-Id: I792ad55656c5dd9f10c6b4db7c5c36cf7be45125
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2022-04-25 13:37:58 +02:00
parent 8e586dfa02
commit f2c267f328
23 changed files with 117 additions and 523 deletions

View File

@@ -45,10 +45,7 @@ class QWidget;
QT_END_NAMESPACE
namespace TextEditor { class TextEditorWidget; }
namespace CppEditor {
class FollowSymbolInterface;
class RefactoringEngineInterface;
} // namespace CppEditor
namespace CppEditor { class RefactoringEngineInterface; }
namespace ClangCodeModel {
namespace Internal {
@@ -71,7 +68,6 @@ public:
TextEditor::BaseHoverHandler *createHoverHandler() override;
CppEditor::BaseEditorDocumentProcessor *createEditorDocumentProcessor(
TextEditor::TextDocument *baseTextDocument) override;
CppEditor::FollowSymbolInterface &followSymbolInterface() override;
CppEditor::RefactoringEngineInterface &refactoringEngineInterface() override;
std::unique_ptr<CppEditor::AbstractOverviewModel> createOverviewModel() override;
bool supportsOutline(const TextEditor::TextDocument *document) const override;
@@ -92,6 +88,12 @@ signals:
void createdClient(ClangdClient *client);
private:
void followSymbol(const CppEditor::CursorInEditor &data,
Utils::ProcessLinkCallback &&processLinkCallback, bool resolveTarget,
bool inNextSplit) override;
void switchDeclDef(const CppEditor::CursorInEditor &data,
Utils::ProcessLinkCallback &&processLinkCallback) override;
void onEditorOpened(Core::IEditor *editor);
void onEditorClosed(const QList<Core::IEditor *> &editors);
void onCurrentEditorChanged(Core::IEditor *newCurrent);
@@ -142,7 +144,6 @@ private:
BackendCommunicator m_communicator;
ClangCompletionAssistProvider m_completionAssistProvider;
ClangCompletionAssistProvider m_functionHintAssistProvider;
std::unique_ptr<CppEditor::FollowSymbolInterface> m_followSymbol;
std::unique_ptr<CppEditor::RefactoringEngineInterface> m_refactoringEngine;
QHash<ProjectExplorer::Project *, ClangProjectSettings *> m_projectSettings;