diff options
author | David Schulz <david.schulz@qt.io> | 2022-05-13 10:05:45 +0200 |
---|---|---|
committer | David Schulz <david.schulz@qt.io> | 2022-05-13 09:18:53 +0000 |
commit | 59a77a4965e2e913767ed5c1d90f6779af6fc8ec (patch) | |
tree | 39ec72d1a3f9d54cde1c3717a42d97c920ebae0b /src/plugins/cppeditor/cppquickfixassistant.cpp | |
parent | 1402b1645191610391367a07d3d644c0b659154f (diff) | |
download | qt-creator-59a77a4965e2e913767ed5c1d90f6779af6fc8ec.tar.gz |
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 <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/cppeditor/cppquickfixassistant.cpp')
-rw-r--r-- | src/plugins/cppeditor/cppquickfixassistant.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
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()) |