forked from qt-creator/qt-creator
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:
@@ -834,6 +834,20 @@ void CppEditorWidget::switchDeclarationDefinition(bool inNextSplit)
|
||||
CppModelManager::switchDeclDef(cursor, std::move(callback));
|
||||
}
|
||||
|
||||
void CppEditorWidget::followSymbolToType(bool inNextSplit)
|
||||
{
|
||||
if (!d->m_modelManager)
|
||||
return;
|
||||
|
||||
const CursorInEditor cursor(textCursor(), textDocument()->filePath(), this, textDocument());
|
||||
const auto callback = [self = QPointer(this),
|
||||
split = inNextSplit != alwaysOpenLinksInNextSplit()](const Link &link) {
|
||||
if (self && link.hasValidTarget())
|
||||
self->openLink(link, split);
|
||||
};
|
||||
CppModelManager::followSymbolToType(cursor, callback, inNextSplit);
|
||||
}
|
||||
|
||||
bool CppEditorWidget::followQrcUrl(const QTextCursor &cursor,
|
||||
const Utils::LinkHandler &processLinkCallback)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user