From 4d1b9a1b533c9a781fba8f0c0409b06c496e7897 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 22 Mar 2018 13:59:18 +0100 Subject: Adapt to TextEditorWidget::findLinkAt change Changed in 08d1274ccc0. Change-Id: Iac2805ac5a5fb05e2a5cf3712b6d7da9971d5150 Reviewed-by: Eike Ziller --- plugins/haskell/haskelleditorwidget.cpp | 10 ++++++---- 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 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; -- cgit v1.2.3