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 gades committed May 9, 2022
1 parent 2f885ab commit 4687711
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
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,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
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,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 4687711

Please sign in to comment.