mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-26 03:03:22 -03:00
gui: Drop unused return values in WalletFrame
This commit is contained in:
parent
a094b54332
commit
28c86de3b1
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…
Add table
Reference in a new issue