forked from qt-creator/qt-creator
CppEditor: use the corrrect link callback when looking for type
Also fixes an unused argument warning.
amends 80633a59aa
Change-Id: I6be122c44010a612d95a20dd987aac6e73a08430
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
committed by
Christian Stenger
parent
298921be2d
commit
8404f05ce6
@@ -991,19 +991,14 @@ void CppEditorWidget::findLinkAt(const QTextCursor &cursor,
|
|||||||
|
|
||||||
void CppEditorWidget::findTypeAt(const QTextCursor &cursor,
|
void CppEditorWidget::findTypeAt(const QTextCursor &cursor,
|
||||||
const Utils::LinkHandler &processLinkCallback,
|
const Utils::LinkHandler &processLinkCallback,
|
||||||
bool resolveTarget,
|
bool /*resolveTarget*/,
|
||||||
bool inNextSplit)
|
bool inNextSplit)
|
||||||
{
|
{
|
||||||
if (!CppModelManager::instance())
|
if (!CppModelManager::instance())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const CursorInEditor cursorInEditor(cursor, textDocument()->filePath(), this, textDocument());
|
const CursorInEditor cursorInEditor(cursor, textDocument()->filePath(), this, textDocument());
|
||||||
const auto callback = [self = QPointer(this),
|
CppModelManager::followSymbolToType(cursorInEditor, processLinkCallback, inNextSplit);
|
||||||
split = inNextSplit != alwaysOpenLinksInNextSplit()](const Link &link) {
|
|
||||||
if (self && link.hasValidTarget())
|
|
||||||
self->openLink(link, split);
|
|
||||||
};
|
|
||||||
CppModelManager::followSymbolToType(cursorInEditor, callback, inNextSplit);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned CppEditorWidget::documentRevision() const
|
unsigned CppEditorWidget::documentRevision() const
|
||||||
|
|||||||
Reference in New Issue
Block a user