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/bitcoin.cpp | |
parent | 12d8d2681e34a191f5d82f15448f8c4c9a14f6d0 (diff) |
Qt: Get wallet name from WalletModel rather than passing it around
Diffstat (limited to 'src/qt/bitcoin.cpp')
-rw-r--r-- | src/qt/bitcoin.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index 424d82ae1f..df1be35c8d 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -487,14 +487,9 @@ void BitcoinApplication::initializeResult(bool success) for (CWalletRef pwallet : vpwallets) { WalletModel * const walletModel = new WalletModel(platformStyle, pwallet, optionsModel); - QString WalletName = QString::fromStdString(pwallet->GetName()); - if (WalletName.endsWith(".dat")) { - WalletName.truncate(WalletName.size() - 4); - } - - window->addWallet(WalletName, walletModel); + window->addWallet(walletModel); if (fFirstWallet) { - window->setCurrentWallet(WalletName); + window->setCurrentWallet(walletModel->getWalletName()); fFirstWallet = false; } |