diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-09-07 08:40:51 +0300 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-09-07 08:48:52 +0300 |
commit | 503194d2ee3d32ce17178c8299c3881a5e1262a4 (patch) | |
tree | d2db64be69c9d4c7122644e6c501997fc47ee783 /src/test | |
parent | 6718fbe90a0d9384c4d954b65f1fd4e69838d10c (diff) | |
parent | d319c4dae9ed7d59d71b926e677707fce4194d0c (diff) | |
download | bitcoin-503194d2ee3d32ce17178c8299c3881a5e1262a4.tar.xz |
Merge bitcoin-core/gui#398: refactor: Pass WalletModel object to the WalletView constructor
d319c4dae9ed7d59d71b926e677707fce4194d0c qt, refactor: Replace WalletFrame::addWallet with WalletFrame::addView (Hennadii Stepanov)
92ddc02a16a74e10f24190929f05e2dcf2b55871 qt, refactor: Declare getWalletModel with const and noexcept qualifiers (Hennadii Stepanov)
ca0e680bdcaa816c53355777d788a4c8478bb117 qt, refactor: Drop redundant checks of walletModel (Hennadii Stepanov)
404373bc6ac0589e9e28690c9d09114d626a3dc3 qt, refactor: Pass WalletModel object to WalletView constructor (Hennadii Stepanov)
Pull request description:
An instance of the `WalletView` class without the `walletModel` data member being set is invalid. So, it is better to set it in the constructor.
Establishing one more `WalletView` class's invariant in constructor:
- allows to drop all of checks of the`walletModel` in member functions
- makes reasoning about the code that uses instances of the `WalletView` class easier
Possible follow ups could extend this approach to other classes, e.g., `OverviewPage`, `TransactionView`, `ReceiveCoinsDialog`, `SendCoinsDialog`, `AddressBookPage`.
ACKs for top commit:
ShaMan239:
Code review ACK d319c4dae9ed7d59d71b926e677707fce4194d0c
promag:
Code review ACK d319c4dae9ed7d59d71b926e677707fce4194d0c.
jarolrod:
ACK d319c4dae9ed7d59d71b926e677707fce4194d0c
Tree-SHA512: b0c61f82811bb5aba2738067b53dc9ea4439230d547ce5c8fd85c480d8d70ea15f9942dbf13842383acbce467fba1ab4e132e37c56b654b46ba897301a41066e
Diffstat (limited to 'src/test')
0 files changed, 0 insertions, 0 deletions