Commit dace83ba authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer
Browse files

Avoid retriggering the completion box when it's already there

There should be no need for the text editor to request an update of the
completion box, since when it's there it will have focus and update

Reviewed-by: Roberto Raggi
parent f088ba71
......@@ -1415,6 +1415,9 @@ void BaseTextEditor::_q_requestAutoCompletion()
if (CompletionSupport::instance()->isActive())
if (d->m_requestAutoCompletionRevision == document()->revision() &&
d->m_requestAutoCompletionPosition == position())
emit requestAutoCompletion(editableInterface(), false);
......@@ -93,6 +93,11 @@ void CompletionSupport::cleanupCompletions()
bool CompletionSupport::isActive() const
return m_completionList != 0;
void CompletionSupport::autoComplete(ITextEditable *editor, bool forced)
autoComplete_helper(editor, forced, /*quickFix = */ false);
......@@ -55,6 +55,9 @@ public:
static CompletionSupport *instance();
bool isActive() const;
public slots:
void autoComplete(TextEditor::ITextEditable *editor, bool forced);
void quickFix(TextEditor::ITextEditable *editor);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment