gui: Enable console line edit on setClientModel

Github-Pull: #16122
Rebased-From: 2d8ad2f997
This commit is contained in:
João Barbosa
2019-05-29 22:53:25 +01:00
committed by MarcoFalke
parent b55cbe82d9
commit 7ed1a60193
2 changed files with 6 additions and 0 deletions

View File

@@ -636,6 +636,9 @@
<property name="placeholderText"> <property name="placeholderText">
<string/> <string/>
</property> </property>
<property name="enabled">
<bool>false</bool>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>

View File

@@ -680,6 +680,9 @@ void RPCConsole::setClientModel(ClientModel *model)
wordList.sort(); wordList.sort();
autoCompleter = new QCompleter(wordList, this); autoCompleter = new QCompleter(wordList, this);
autoCompleter->setModelSorting(QCompleter::CaseSensitivelySortedModel); autoCompleter->setModelSorting(QCompleter::CaseSensitivelySortedModel);
// ui->lineEdit is initially disabled because running commands is only
// possible from now on.
ui->lineEdit->setEnabled(true);
ui->lineEdit->setCompleter(autoCompleter); ui->lineEdit->setCompleter(autoCompleter);
autoCompleter->popup()->installEventFilter(this); autoCompleter->popup()->installEventFilter(this);
// Start thread to execute RPC commands. // Start thread to execute RPC commands.