diff options
author | Luke Dashjr <luke-jr+git@utopios.org> | 2017-10-12 07:22:48 +0000 |
---|---|---|
committer | Jonas Schnelli <dev@jonasschnelli.ch> | 2018-03-26 18:40:26 +0700 |
commit | b6d04fc7cc5de3370d2d8255f2b3e43f6bf9c80d (patch) | |
tree | 1ee0d7aeed7c411ad495a14b52f14ccb162ecc58 /src/qt/bitcoingui.cpp | |
parent | 12d8d2681e34a191f5d82f15448f8c4c9a14f6d0 (diff) | |
download | bitcoin-b6d04fc7cc5de3370d2d8255f2b3e43f6bf9c80d.tar.xz |
Qt: Get wallet name from WalletModel rather than passing it around
Diffstat (limited to 'src/qt/bitcoingui.cpp')
-rw-r--r-- | src/qt/bitcoingui.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 249c27ad6a..e9090e6a26 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -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) |