mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Fix autocomplete not being refreshed properly upon first TAB
This commit is contained in:
parent
468ede66ea
commit
ec63bc59be
1 changed files with 1 additions and 3 deletions
|
@ -92,6 +92,7 @@ void ResizingTextEdit::keyPressEvent(QKeyEvent *event)
|
||||||
|
|
||||||
if (!this->nextCompletion) {
|
if (!this->nextCompletion) {
|
||||||
completionModel->refresh();
|
completionModel->refresh();
|
||||||
|
this->completer->setModel(completionModel);
|
||||||
// first selection
|
// first selection
|
||||||
this->completer->setCompletionPrefix(currentCompletionPrefix);
|
this->completer->setCompletionPrefix(currentCompletionPrefix);
|
||||||
this->nextCompletion = true;
|
this->nextCompletion = true;
|
||||||
|
@ -133,9 +134,6 @@ void ResizingTextEdit::setCompleter(QCompleter *c)
|
||||||
this->completer->setWidget(this);
|
this->completer->setWidget(this);
|
||||||
this->completer->setCompletionMode(QCompleter::InlineCompletion);
|
this->completer->setCompletionMode(QCompleter::InlineCompletion);
|
||||||
this->completer->setCaseSensitivity(Qt::CaseInsensitive);
|
this->completer->setCaseSensitivity(Qt::CaseInsensitive);
|
||||||
/*QObject::connect(this->completer, SIGNAL(highlighted(QString)), this,
|
|
||||||
SLOT(insertCompletion(QString)));
|
|
||||||
*/
|
|
||||||
QObject::connect(completer,
|
QObject::connect(completer,
|
||||||
static_cast<void (QCompleter::*)(const QString &)>(&QCompleter::highlighted),
|
static_cast<void (QCompleter::*)(const QString &)>(&QCompleter::highlighted),
|
||||||
this, &ResizingTextEdit::insertCompletion);
|
this, &ResizingTextEdit::insertCompletion);
|
||||||
|
|
Loading…
Reference in a new issue