mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-12 13:43:43 +01:00
Qt: Get wallet name from WalletModel rather than passing it around
This commit is contained in:
committed by
Jonas Schnelli
parent
12d8d2681e
commit
b6d04fc7cc
@@ -538,10 +538,11 @@ void BitcoinGUI::setClientModel(ClientModel *_clientModel)
|
||||
}
|
||||
|
||||
#ifdef ENABLE_WALLET
|
||||
bool BitcoinGUI::addWallet(const QString& name, WalletModel *walletModel)
|
||||
bool BitcoinGUI::addWallet(WalletModel *walletModel)
|
||||
{
|
||||
if(!walletFrame)
|
||||
return false;
|
||||
const QString name = walletModel->getWalletName();
|
||||
setWalletActionsEnabled(true);
|
||||
m_wallet_selector->addItem(name);
|
||||
if (m_wallet_selector->count() == 2) {
|
||||
@@ -551,8 +552,8 @@ bool BitcoinGUI::addWallet(const QString& name, WalletModel *walletModel)
|
||||
appToolBar->addWidget(m_wallet_selector_label);
|
||||
appToolBar->addWidget(m_wallet_selector);
|
||||
}
|
||||
rpcConsole->addWallet(name, walletModel);
|
||||
return walletFrame->addWallet(name, walletModel);
|
||||
rpcConsole->addWallet(walletModel);
|
||||
return walletFrame->addWallet(walletModel);
|
||||
}
|
||||
|
||||
bool BitcoinGUI::setCurrentWallet(const QString& name)
|
||||
|
||||
Reference in New Issue
Block a user