From f2c267f3283ef70ad053b507b17513be068b2e6b Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 25 Apr 2022 13:37:58 +0200 Subject: 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: Reviewed-by: David Schulz --- src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp') diff --git a/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp b/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp index 63f16e98096..cd423e0cec9 100644 --- a/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp +++ b/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp @@ -350,9 +350,7 @@ F2TestCase::F2TestCase(CppEditorAction action, switch (action) { case FollowSymbolUnderCursorAction: { CppEditorWidget *widget = initialTestFile->m_editorWidget; - FollowSymbolInterface &delegate = CppModelManager::instance()->followSymbolInterface(); - auto* builtinFollowSymbol = dynamic_cast(&delegate); - if (!builtinFollowSymbol) { + if (CppModelManager::instance()->isClangCodeModelActive()) { if (curTestName == "testFollowSymbolQTCREATORBUG7903") QSKIP((curTestName + " is not supported by Clang FollowSymbol").toLatin1()); widget->enableTestMode(); @@ -360,6 +358,7 @@ F2TestCase::F2TestCase(CppEditorAction action, break; } + FollowSymbolUnderCursor *builtinFollowSymbol = &CppModelManager::builtinFollowSymbol(); QSharedPointer original = builtinFollowSymbol->virtualFunctionAssistProvider(); -- cgit v1.2.3