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:
@@ -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_;
|
||||
|
||||
Reference in New Issue
Block a user