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

@@ -29,6 +29,8 @@
#include <QScopedPointer>
namespace CppEditor { class FollowSymbolUnderCursor; }
namespace CppEditor::Internal {
class BuiltinModelManagerSupport: public ModelManagerSupport
@@ -44,13 +46,19 @@ public:
TextEditor::BaseHoverHandler *createHoverHandler() final;
BaseEditorDocumentProcessor *createEditorDocumentProcessor(
TextEditor::TextDocument *baseTextDocument) final;
FollowSymbolInterface &followSymbolInterface() final;
RefactoringEngineInterface &refactoringEngineInterface() final;
std::unique_ptr<AbstractOverviewModel> createOverviewModel() final;
FollowSymbolUnderCursor &followSymbolInterface() { return *m_followSymbol; }
private:
void followSymbol(const CursorInEditor &data, Utils::ProcessLinkCallback &&processLinkCallback,
bool resolveTarget, bool inNextSplit) override;
void switchDeclDef(const CursorInEditor &data,
Utils::ProcessLinkCallback &&processLinkCallback) override;
QScopedPointer<CppCompletionAssistProvider> m_completionAssistProvider;
QScopedPointer<FollowSymbolInterface> m_followSymbol;
QScopedPointer<FollowSymbolUnderCursor> m_followSymbol;
QScopedPointer<RefactoringEngineInterface> m_refactoringEngine;
};