aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2018-03-22 13:59:18 +0100
committerEike Ziller <eike.ziller@qt.io>2018-03-22 13:00:27 +0000
commit4d1b9a1b533c9a781fba8f0c0409b06c496e7897 (patch)
tree03e0825aa1894fe10ca4a93382304adc9f34c720
parent9c5e5ff372dee4bb9fe459734f9013abb6a0df39 (diff)
Adapt to TextEditorWidget::findLinkAt change
Changed in 08d1274ccc0. Change-Id: Iac2805ac5a5fb05e2a5cf3712b6d7da9971d5150 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
-rw-r--r--plugins/haskell/haskelleditorwidget.cpp10
-rw-r--r--plugins/haskell/haskelleditorwidget.h6
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;