gui: Remove unused return type in some BitcoinGUI methods
This commit is contained in:
parent
a5daf70ffb
commit
f411c8b35b
2 changed files with 15 additions and 17 deletions
|
@ -571,10 +571,9 @@ void BitcoinGUI::setClientModel(ClientModel *_clientModel)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_WALLET
|
#ifdef ENABLE_WALLET
|
||||||
bool BitcoinGUI::addWallet(WalletModel *walletModel)
|
void BitcoinGUI::addWallet(WalletModel* walletModel)
|
||||||
{
|
{
|
||||||
if(!walletFrame)
|
if (!walletFrame) return;
|
||||||
return false;
|
|
||||||
const QString display_name = walletModel->getDisplayName();
|
const QString display_name = walletModel->getDisplayName();
|
||||||
setWalletActionsEnabled(true);
|
setWalletActionsEnabled(true);
|
||||||
m_wallet_selector->addItem(display_name, QVariant::fromValue(walletModel));
|
m_wallet_selector->addItem(display_name, QVariant::fromValue(walletModel));
|
||||||
|
@ -583,12 +582,12 @@ bool BitcoinGUI::addWallet(WalletModel *walletModel)
|
||||||
m_wallet_selector_action->setVisible(true);
|
m_wallet_selector_action->setVisible(true);
|
||||||
}
|
}
|
||||||
rpcConsole->addWallet(walletModel);
|
rpcConsole->addWallet(walletModel);
|
||||||
return walletFrame->addWallet(walletModel);
|
walletFrame->addWallet(walletModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BitcoinGUI::removeWallet(WalletModel* walletModel)
|
void BitcoinGUI::removeWallet(WalletModel* walletModel)
|
||||||
{
|
{
|
||||||
if (!walletFrame) return false;
|
if (!walletFrame) return;
|
||||||
int index = m_wallet_selector->findData(QVariant::fromValue(walletModel));
|
int index = m_wallet_selector->findData(QVariant::fromValue(walletModel));
|
||||||
m_wallet_selector->removeItem(index);
|
m_wallet_selector->removeItem(index);
|
||||||
if (m_wallet_selector->count() == 0) {
|
if (m_wallet_selector->count() == 0) {
|
||||||
|
@ -598,20 +597,19 @@ bool BitcoinGUI::removeWallet(WalletModel* walletModel)
|
||||||
m_wallet_selector_action->setVisible(false);
|
m_wallet_selector_action->setVisible(false);
|
||||||
}
|
}
|
||||||
rpcConsole->removeWallet(walletModel);
|
rpcConsole->removeWallet(walletModel);
|
||||||
return walletFrame->removeWallet(walletModel);
|
walletFrame->removeWallet(walletModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BitcoinGUI::setCurrentWallet(WalletModel* wallet_model)
|
void BitcoinGUI::setCurrentWallet(WalletModel* wallet_model)
|
||||||
{
|
{
|
||||||
if(!walletFrame)
|
if (!walletFrame) return;
|
||||||
return false;
|
walletFrame->setCurrentWallet(wallet_model);
|
||||||
return walletFrame->setCurrentWallet(wallet_model);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BitcoinGUI::setCurrentWalletBySelectorIndex(int index)
|
void BitcoinGUI::setCurrentWalletBySelectorIndex(int index)
|
||||||
{
|
{
|
||||||
WalletModel* wallet_model = m_wallet_selector->itemData(index).value<WalletModel*>();
|
WalletModel* wallet_model = m_wallet_selector->itemData(index).value<WalletModel*>();
|
||||||
return setCurrentWallet(wallet_model);
|
setCurrentWallet(wallet_model);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BitcoinGUI::removeAllWallets()
|
void BitcoinGUI::removeAllWallets()
|
||||||
|
|
|
@ -80,8 +80,8 @@ public:
|
||||||
The wallet model represents a bitcoin wallet, and offers access to the list of transactions, address book and sending
|
The wallet model represents a bitcoin wallet, and offers access to the list of transactions, address book and sending
|
||||||
functionality.
|
functionality.
|
||||||
*/
|
*/
|
||||||
bool addWallet(WalletModel *walletModel);
|
void addWallet(WalletModel* walletModel);
|
||||||
bool removeWallet(WalletModel* walletModel);
|
void removeWallet(WalletModel* walletModel);
|
||||||
void removeAllWallets();
|
void removeAllWallets();
|
||||||
#endif // ENABLE_WALLET
|
#endif // ENABLE_WALLET
|
||||||
bool enableWallet = false;
|
bool enableWallet = false;
|
||||||
|
@ -213,8 +213,8 @@ public Q_SLOTS:
|
||||||
void message(const QString &title, const QString &message, unsigned int style, bool *ret = nullptr);
|
void message(const QString &title, const QString &message, unsigned int style, bool *ret = nullptr);
|
||||||
|
|
||||||
#ifdef ENABLE_WALLET
|
#ifdef ENABLE_WALLET
|
||||||
bool setCurrentWallet(WalletModel* wallet_model);
|
void setCurrentWallet(WalletModel* wallet_model);
|
||||||
bool setCurrentWalletBySelectorIndex(int index);
|
void setCurrentWalletBySelectorIndex(int index);
|
||||||
/** Set the UI status indicators based on the currently selected wallet.
|
/** Set the UI status indicators based on the currently selected wallet.
|
||||||
*/
|
*/
|
||||||
void updateWalletStatus();
|
void updateWalletStatus();
|
||||||
|
|
Loading…
Reference in a new issue