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

@@ -124,25 +124,5 @@ void RefactoringEngine::findUsages(const CppEditor::CursorInEditor &cursor,
client->findUsages(cursor.textDocument(), cursor.cursor(), {});
}
void RefactoringEngine::globalFollowSymbol(
const CppEditor::CursorInEditor &cursor,
Utils::ProcessLinkCallback &&callback,
const CPlusPlus::Snapshot &snapshot,
const CPlusPlus::Document::Ptr &doc,
CppEditor::SymbolFinder *symbolFinder,
bool inNextSplit) const
{
ClangdClient * const client
= ClangModelManagerSupport::instance()->clientForFile(cursor.filePath());
if (!client || !client->isFullyIndexed()) {
CppEditor::CppModelManager::builtinRefactoringEngine()
->globalFollowSymbol(cursor, std::move(callback), snapshot, doc, symbolFinder,
inNextSplit);
return;
}
client->followSymbol(cursor.textDocument(), cursor.cursor(), cursor.editorWidget(),
std::move(callback), true, inNextSplit);
}
} // namespace Internal
} // namespace ClangCodeModel