Implement simpler fix for emote completion bug

This commit implements a simpler fix for the problem described in #1209.
The setting's signal is connected to a reset of `completionInProgress_`
so that the completion model is updated on the next word already.

This commit also removes the older approach tackling this issue.
This commit is contained in:
Leon Richardt
2019-08-18 21:37:20 +02:00
parent 23a5f0bfb2
commit f2b2e3142f
5 changed files with 9 additions and 41 deletions
+5 -5
View File
@@ -16,6 +16,11 @@ ResizingTextEdit::ResizingTextEdit()
QObject::connect(this, &QTextEdit::textChanged, this,
&QWidget::updateGeometry);
// Whenever the setting for emote completion changes, force a
// refresh on the completion model the next time "Tab" is pressed
getSettings()->prefixOnlyEmoteCompletion.connect(
[this] { this->completionInProgress_ = false; });
this->setFocusPolicy(Qt::ClickFocus);
}
@@ -260,11 +265,6 @@ void ResizingTextEdit::insertFromMimeData(const QMimeData *source)
}
}
void ResizingTextEdit::resetCompletionInProgress()
{
this->completionInProgress_ = false;
}
QCompleter *ResizingTextEdit::getCompleter() const
{
return this->completer_;