Skip to content

Commit

Permalink
Merge bitcoin#16122: gui: Enable console line edit on setClientModel
Browse files Browse the repository at this point in the history
2d8ad2f gui: Enable console line edit on setClientModel (João Barbosa)

Pull request description:

  Make console line edit disable by default, and only enable once `RPCConsole::setClientModel` is called.

  Fixes bitcoin#16119.

ACKs for commit 2d8ad2:
  fanquake:
    tACK bitcoin@2d8ad2f on macOS.

Tree-SHA512: 1418ce3c120c08e5ec3e7a7a063572a24402ce0ec541bd4adc21f61d60c4e86b711e82e940ebf5f0445ab861f89c146c2a2e7990fb52bed2c65fc199a1981f71
  • Loading branch information
laanwj authored and PastaPastaPasta committed Jul 1, 2021
1 parent f251186 commit e55a34e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/qt/forms/debugwindow.ui
Expand Up @@ -608,6 +608,9 @@
<property name="placeholderText">
<string/>
</property>
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
Expand Down
3 changes: 3 additions & 0 deletions src/qt/rpcconsole.cpp
Expand Up @@ -720,6 +720,9 @@ void RPCConsole::setClientModel(ClientModel *model)
autoCompleter->popup()->setItemDelegate(new QStyledItemDelegate(this));
autoCompleter->popup()->setObjectName("rpcAutoCompleter");
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);
autoCompleter->popup()->installEventFilter(this);
// Start thread to execute RPC commands.
Expand Down

0 comments on commit e55a34e

Please sign in to comment.