CppEditor: Add actions for following a symbol to its type

Change-Id: I0b3913993b09b006e2d0431a68e98e21e8865898
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2022-09-26 12:59:22 +02:00
parent fbbf0d9149
commit 9db286b3d6
12 changed files with 88 additions and 2 deletions

View File

@@ -270,6 +270,19 @@ void ClangModelManagerSupport::followSymbol(const CppEditor::CursorInEditor &dat
CppModelManager::Backend::Builtin);
}
void ClangModelManagerSupport::followSymbolToType(const CppEditor::CursorInEditor &data,
const Utils::LinkHandler &processLinkCallback,
bool inNextSplit)
{
if (ClangdClient * const client = clientForFile(data.filePath())) {
client->followSymbol(data.textDocument(), data.cursor(), data.editorWidget(),
processLinkCallback, false, FollowTo::SymbolType, inNextSplit);
return;
}
CppModelManager::followSymbolToType(data, processLinkCallback, inNextSplit,
CppModelManager::Backend::Builtin);
}
void ClangModelManagerSupport::switchDeclDef(const CppEditor::CursorInEditor &data,
const Utils::LinkHandler &processLinkCallback)
{