forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -105,9 +105,12 @@ public:
|
||||
QStringList completions;
|
||||
LanguageFeatures languageFeatures = LanguageFeatures::defaultFeatures();
|
||||
languageFeatures.objCEnabled = false;
|
||||
QTextCursor textCursor = m_editorWidget->textCursor();
|
||||
textCursor.setPosition(m_position);
|
||||
m_editorWidget->setTextCursor(textCursor);
|
||||
CppCompletionAssistInterface *ai
|
||||
= new CppCompletionAssistInterface(m_editorWidget->textDocument()->filePath(),
|
||||
m_textDocument, m_position,
|
||||
m_editorWidget,
|
||||
ExplicitlyInvoked, m_snapshot,
|
||||
ProjectExplorer::HeaderPaths(),
|
||||
languageFeatures);
|
||||
|
||||
Reference in New Issue
Block a user