Merge #15464: gui: Drop unused return values in WalletFrame
28c86de3b
gui: Drop unused return values in WalletFrame (João Barbosa)
Pull request description:
This is a small cleanup since the return value of `WalletFrame` methods are not used. This is in line with the usual async slot declaration.
Tree-SHA512: ff0ca098804118bba200a58cd796ff90e853a6430e58125bd178b7bfa9b2b763c13d17b81e8f3ebd94395cac249d80379ba1529680c47682ba6a2ed81492ba33
This commit is contained in:
commit
d211edb349
2 changed files with 10 additions and 20 deletions
|
@ -40,15 +40,11 @@ void WalletFrame::setClientModel(ClientModel *_clientModel)
|
|||
this->clientModel = _clientModel;
|
||||
}
|
||||
|
||||
bool WalletFrame::addWallet(WalletModel *walletModel)
|
||||
void WalletFrame::addWallet(WalletModel *walletModel)
|
||||
{
|
||||
if (!gui || !clientModel || !walletModel) {
|
||||
return false;
|
||||
}
|
||||
if (!gui || !clientModel || !walletModel) return;
|
||||
|
||||
if (mapWalletViews.count(walletModel) > 0) {
|
||||
return false;
|
||||
}
|
||||
if (mapWalletViews.count(walletModel) > 0) return;
|
||||
|
||||
WalletView *walletView = new WalletView(platformStyle, this);
|
||||
walletView->setBitcoinGUI(gui);
|
||||
|
@ -72,31 +68,25 @@ bool WalletFrame::addWallet(WalletModel *walletModel)
|
|||
});
|
||||
|
||||
connect(walletView, &WalletView::outOfSyncWarningClicked, this, &WalletFrame::outOfSyncWarningClicked);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool WalletFrame::setCurrentWallet(WalletModel* wallet_model)
|
||||
void WalletFrame::setCurrentWallet(WalletModel* wallet_model)
|
||||
{
|
||||
if (mapWalletViews.count(wallet_model) == 0)
|
||||
return false;
|
||||
if (mapWalletViews.count(wallet_model) == 0) return;
|
||||
|
||||
WalletView *walletView = mapWalletViews.value(wallet_model);
|
||||
walletStack->setCurrentWidget(walletView);
|
||||
assert(walletView);
|
||||
walletView->updateEncryptionStatus();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool WalletFrame::removeWallet(WalletModel* wallet_model)
|
||||
void WalletFrame::removeWallet(WalletModel* wallet_model)
|
||||
{
|
||||
if (mapWalletViews.count(wallet_model) == 0)
|
||||
return false;
|
||||
if (mapWalletViews.count(wallet_model) == 0) return;
|
||||
|
||||
WalletView *walletView = mapWalletViews.take(wallet_model);
|
||||
walletStack->removeWidget(walletView);
|
||||
delete walletView;
|
||||
return true;
|
||||
}
|
||||
|
||||
void WalletFrame::removeAllWallets()
|
||||
|
|
|
@ -36,9 +36,9 @@ public:
|
|||
|
||||
void setClientModel(ClientModel *clientModel);
|
||||
|
||||
bool addWallet(WalletModel *walletModel);
|
||||
bool setCurrentWallet(WalletModel* wallet_model);
|
||||
bool removeWallet(WalletModel* wallet_model);
|
||||
void addWallet(WalletModel *walletModel);
|
||||
void setCurrentWallet(WalletModel* wallet_model);
|
||||
void removeWallet(WalletModel* wallet_model);
|
||||
void removeAllWallets();
|
||||
|
||||
bool handlePaymentRequest(const SendCoinsRecipient& recipient);
|
||||
|
|
Loading…
Reference in a new issue