diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2022-04-25 13:37:58 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2022-04-28 09:47:52 +0000 |
commit | f2c267f3283ef70ad053b507b17513be068b2e6b (patch) | |
tree | f7dd540213b7042a6e51e83f6252d55f5fa248b4 /src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp | |
parent | 8e586dfa022232a82762503c896a0088429cd8c7 (diff) |
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>
Diffstat (limited to 'src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp')
-rw-r--r-- | src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp b/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp index 63f16e9809..cd423e0cec 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<FollowSymbolUnderCursor *>(&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<VirtualFunctionAssistProvider> original = builtinFollowSymbol->virtualFunctionAssistProvider(); |