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;
|
this->clientModel = _clientModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WalletFrame::addWallet(WalletModel *walletModel)
|
void WalletFrame::addWallet(WalletModel *walletModel)
|
||||||
{
|
{
|
||||||
if (!gui || !clientModel || !walletModel) {
|
if (!gui || !clientModel || !walletModel) return;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mapWalletViews.count(walletModel) > 0) {
|
if (mapWalletViews.count(walletModel) > 0) return;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
WalletView *walletView = new WalletView(platformStyle, this);
|
WalletView *walletView = new WalletView(platformStyle, this);
|
||||||
walletView->setBitcoinGUI(gui);
|
walletView->setBitcoinGUI(gui);
|
||||||
|
@ -72,31 +68,25 @@ bool WalletFrame::addWallet(WalletModel *walletModel)
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(walletView, &WalletView::outOfSyncWarningClicked, this, &WalletFrame::outOfSyncWarningClicked);
|
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)
|
if (mapWalletViews.count(wallet_model) == 0) return;
|
||||||
return false;
|
|
||||||
|
|
||||||
WalletView *walletView = mapWalletViews.value(wallet_model);
|
WalletView *walletView = mapWalletViews.value(wallet_model);
|
||||||
walletStack->setCurrentWidget(walletView);
|
walletStack->setCurrentWidget(walletView);
|
||||||
assert(walletView);
|
assert(walletView);
|
||||||
walletView->updateEncryptionStatus();
|
walletView->updateEncryptionStatus();
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WalletFrame::removeWallet(WalletModel* wallet_model)
|
void WalletFrame::removeWallet(WalletModel* wallet_model)
|
||||||
{
|
{
|
||||||
if (mapWalletViews.count(wallet_model) == 0)
|
if (mapWalletViews.count(wallet_model) == 0) return;
|
||||||
return false;
|
|
||||||
|
|
||||||
WalletView *walletView = mapWalletViews.take(wallet_model);
|
WalletView *walletView = mapWalletViews.take(wallet_model);
|
||||||
walletStack->removeWidget(walletView);
|
walletStack->removeWidget(walletView);
|
||||||
delete walletView;
|
delete walletView;
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void WalletFrame::removeAllWallets()
|
void WalletFrame::removeAllWallets()
|
||||||
|
|
|
@ -36,9 +36,9 @@ public:
|
||||||
|
|
||||||
void setClientModel(ClientModel *clientModel);
|
void setClientModel(ClientModel *clientModel);
|
||||||
|
|
||||||
bool addWallet(WalletModel *walletModel);
|
void addWallet(WalletModel *walletModel);
|
||||||
bool setCurrentWallet(WalletModel* wallet_model);
|
void setCurrentWallet(WalletModel* wallet_model);
|
||||||
bool removeWallet(WalletModel* wallet_model);
|
void removeWallet(WalletModel* wallet_model);
|
||||||
void removeAllWallets();
|
void removeAllWallets();
|
||||||
|
|
||||||
bool handlePaymentRequest(const SendCoinsRecipient& recipient);
|
bool handlePaymentRequest(const SendCoinsRecipient& recipient);
|
||||||
|
|
Loading…
Reference in a new issue