From 59a77a4965e2e913767ed5c1d90f6779af6fc8ec Mon Sep 17 00:00:00 2001 From: David Schulz Date: Fri, 13 May 2022 10:05:45 +0200 Subject: TextEditor: add text cursor to assist interface This will allow us to request assistance for a specific selection instead of just the position. Change-Id: Ib8e5b32d4a8f2936e5a6f1b7ac968d7f1d8d9de6 Reviewed-by: Christian Kandeler --- src/plugins/cppeditor/cppquickfixassistant.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/plugins/cppeditor/cppquickfixassistant.cpp') diff --git a/src/plugins/cppeditor/cppquickfixassistant.cpp b/src/plugins/cppeditor/cppquickfixassistant.cpp index 9d5d2271a6..5310ef7f7a 100644 --- a/src/plugins/cppeditor/cppquickfixassistant.cpp +++ b/src/plugins/cppeditor/cppquickfixassistant.cpp @@ -74,10 +74,8 @@ IAssistProcessor *CppQuickFixAssistProvider::createProcessor(const AssistInterfa // -------------------------- // CppQuickFixAssistInterface // -------------------------- -CppQuickFixInterface::CppQuickFixInterface(CppEditorWidget *editor, - AssistReason reason) - : AssistInterface(editor->document(), editor->position(), - editor->textDocument()->filePath(), reason) +CppQuickFixInterface::CppQuickFixInterface(CppEditorWidget *editor, AssistReason reason) + : AssistInterface(editor->textCursor(), editor->textDocument()->filePath(), reason) , m_editor(editor) , m_semanticInfo(editor->semanticInfo()) , m_snapshot(CppModelManager::instance()->snapshot()) -- cgit v1.2.1