diff options
Diffstat (limited to 'plugins/haskell')
-rw-r--r-- | plugins/haskell/haskelleditorwidget.cpp | 10 | ||||
-rw-r--r-- | plugins/haskell/haskelleditorwidget.h | 6 |
2 files changed, 10 insertions, 6 deletions
diff --git a/plugins/haskell/haskelleditorwidget.cpp b/plugins/haskell/haskelleditorwidget.cpp index 6454d82..d4154ae 100644 --- a/plugins/haskell/haskelleditorwidget.cpp +++ b/plugins/haskell/haskelleditorwidget.cpp @@ -88,9 +88,12 @@ void HaskellEditorWidget::showFailedToStartStackError(const QString &stackExecut } } -Utils::Link HaskellEditorWidget::findLinkAt(const QTextCursor &cursor, - bool resolveTarget, bool inNextSplit) +void HaskellEditorWidget::findLinkAt(const QTextCursor &cursor, + Utils::ProcessLinkCallback &&processLinkCallback, + bool resolveTarget, + bool inNextSplit) { + Utils::Link link; int line, column; const Utils::optional<Token> symbol = symbolAt(document(), cursor.position(), &line, &column); if (symbol) { @@ -102,9 +105,8 @@ Utils::Link HaskellEditorWidget::findLinkAt(const QTextCursor &cursor, m_followSymbolAssistProvider.setOpenInNextSplit(inNextSplit); invokeAssist(FollowSymbol, &m_followSymbolAssistProvider); } - return link; } - return Utils::Link(); + processLinkCallback(link); } } // namespace Internal diff --git a/plugins/haskell/haskelleditorwidget.h b/plugins/haskell/haskelleditorwidget.h index 2421fc3..24af561 100644 --- a/plugins/haskell/haskelleditorwidget.h +++ b/plugins/haskell/haskelleditorwidget.h @@ -47,8 +47,10 @@ public: TextEditor::TextEditorWidget *widget); protected: - Utils::Link findLinkAt(const QTextCursor &cursor, bool resolveTarget = true, - bool inNextSplit = false) override; + void findLinkAt(const QTextCursor &cursor, + Utils::ProcessLinkCallback &&processLinkCallback, + bool resolveTarget = true, + bool inNextSplit = false) override; private: FollowSymbolAssistProvider m_followSymbolAssistProvider; |