Skip to content

Commit f411c8b

Browse files
committed
gui: Remove unused return type in some BitcoinGUI methods
1 parent a5daf70 commit f411c8b

File tree

2 files changed

+15
-17
lines changed

2 files changed

+15
-17
lines changed

src/qt/bitcoingui.cpp

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -571,10 +571,9 @@ void BitcoinGUI::setClientModel(ClientModel *_clientModel)
571571
}
572572

573573
#ifdef ENABLE_WALLET
574-
bool BitcoinGUI::addWallet(WalletModel *walletModel)
574+
void BitcoinGUI::addWallet(WalletModel* walletModel)
575575
{
576-
if(!walletFrame)
577-
return false;
576+
if (!walletFrame) return;
578577
const QString display_name = walletModel->getDisplayName();
579578
setWalletActionsEnabled(true);
580579
m_wallet_selector->addItem(display_name, QVariant::fromValue(walletModel));
@@ -583,12 +582,12 @@ bool BitcoinGUI::addWallet(WalletModel *walletModel)
583582
m_wallet_selector_action->setVisible(true);
584583
}
585584
rpcConsole->addWallet(walletModel);
586-
return walletFrame->addWallet(walletModel);
585+
walletFrame->addWallet(walletModel);
587586
}
588587

589-
bool BitcoinGUI::removeWallet(WalletModel* walletModel)
588+
void BitcoinGUI::removeWallet(WalletModel* walletModel)
590589
{
591-
if (!walletFrame) return false;
590+
if (!walletFrame) return;
592591
int index = m_wallet_selector->findData(QVariant::fromValue(walletModel));
593592
m_wallet_selector->removeItem(index);
594593
if (m_wallet_selector->count() == 0) {
@@ -598,20 +597,19 @@ bool BitcoinGUI::removeWallet(WalletModel* walletModel)
598597
m_wallet_selector_action->setVisible(false);
599598
}
600599
rpcConsole->removeWallet(walletModel);
601-
return walletFrame->removeWallet(walletModel);
600+
walletFrame->removeWallet(walletModel);
602601
}
603602

604-
bool BitcoinGUI::setCurrentWallet(WalletModel* wallet_model)
603+
void BitcoinGUI::setCurrentWallet(WalletModel* wallet_model)
605604
{
606-
if(!walletFrame)
607-
return false;
608-
return walletFrame->setCurrentWallet(wallet_model);
605+
if (!walletFrame) return;
606+
walletFrame->setCurrentWallet(wallet_model);
609607
}
610608

611-
bool BitcoinGUI::setCurrentWalletBySelectorIndex(int index)
609+
void BitcoinGUI::setCurrentWalletBySelectorIndex(int index)
612610
{
613611
WalletModel* wallet_model = m_wallet_selector->itemData(index).value<WalletModel*>();
614-
return setCurrentWallet(wallet_model);
612+
setCurrentWallet(wallet_model);
615613
}
616614

617615
void BitcoinGUI::removeAllWallets()

src/qt/bitcoingui.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ class BitcoinGUI : public QMainWindow
8080
The wallet model represents a bitcoin wallet, and offers access to the list of transactions, address book and sending
8181
functionality.
8282
*/
83-
bool addWallet(WalletModel *walletModel);
84-
bool removeWallet(WalletModel* walletModel);
83+
void addWallet(WalletModel* walletModel);
84+
void removeWallet(WalletModel* walletModel);
8585
void removeAllWallets();
8686
#endif // ENABLE_WALLET
8787
bool enableWallet = false;
@@ -213,8 +213,8 @@ public Q_SLOTS:
213213
void message(const QString &title, const QString &message, unsigned int style, bool *ret = nullptr);
214214

215215
#ifdef ENABLE_WALLET
216-
bool setCurrentWallet(WalletModel* wallet_model);
217-
bool setCurrentWalletBySelectorIndex(int index);
216+
void setCurrentWallet(WalletModel* wallet_model);
217+
void setCurrentWalletBySelectorIndex(int index);
218218
/** Set the UI status indicators based on the currently selected wallet.
219219
*/
220220
void updateWalletStatus();

0 commit comments

Comments
 (0)