mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-13 07:28:59 +01:00
qt, refactor: Replace WalletFrame::addWallet with WalletFrame::addView
No need to pass an instance of the WalletModel class to this method. Co-authored-by: João Barbosa <joao.paulo.barbosa@gmail.com>
This commit is contained in:
@@ -64,11 +64,11 @@ void WalletFrame::setClientModel(ClientModel *_clientModel)
|
||||
}
|
||||
}
|
||||
|
||||
bool WalletFrame::addWallet(WalletModel* walletModel, WalletView* walletView)
|
||||
bool WalletFrame::addView(WalletView* walletView)
|
||||
{
|
||||
if (!clientModel || !walletModel) return false;
|
||||
if (!clientModel) return false;
|
||||
|
||||
if (mapWalletViews.count(walletModel) > 0) return false;
|
||||
if (mapWalletViews.count(walletView->getWalletModel()) > 0) return false;
|
||||
|
||||
walletView->setClientModel(clientModel);
|
||||
walletView->showOutOfSyncWarning(bOutOfSync);
|
||||
@@ -81,7 +81,7 @@ bool WalletFrame::addWallet(WalletModel* walletModel, WalletView* walletView)
|
||||
}
|
||||
|
||||
walletStack->addWidget(walletView);
|
||||
mapWalletViews[walletModel] = walletView;
|
||||
mapWalletViews[walletView->getWalletModel()] = walletView;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user