qt, refactor: Pass WalletModel object to WalletView constructor

An instance of the WalletView class without walletModel data member
being set is invalid. So, it is better to set it in the constructor.
This commit is contained in:
Hennadii Stepanov
2021-08-07 17:01:16 +03:00
parent 774a4f517c
commit 404373bc6a
4 changed files with 39 additions and 45 deletions

View File

@@ -71,7 +71,6 @@ bool WalletFrame::addWallet(WalletModel* walletModel, WalletView* walletView)
if (mapWalletViews.count(walletModel) > 0) return false;
walletView->setClientModel(clientModel);
walletView->setWalletModel(walletModel);
walletView->showOutOfSyncWarning(bOutOfSync);
WalletView* current_wallet_view = currentWalletView();