Page MenuHomePhabricator

gui: simplify wallet_model creation
ClosedPublic

Authored by PiRK on Dec 7 2020, 15:07.

Details

Reviewers
majcosta
Group Reviewers
Restricted Project
Commits
rABC8d55767e3cf1: gui: simplify wallet_model creation
Summary

For Core, this commit removed a warning when building without the wallet, because the wallet_model nullptr was defined outside of the #ifdef ENABLE_WALLET context. This problem was already fixed by D4661 in Bitcoin ABC.

So this is a simple refactoring that simplifies the code.

Quote from the PR conversation:

accessing the current element of a combox-box using QComboBox::currentData() instead of using the index is possible since Qt 5.2

This is a backport of Core PR17939

Test Plan

ninja && ninja check && src/qt/bitcoin-qt

In the RPC console, type a wallet related command and press enter while the line edit is the active widget.