diff options
| author | Luke Dashjr <[email protected]> | 2017-10-12 07:22:48 +0000 |
|---|---|---|
| committer | Jonas Schnelli <[email protected]> | 2018-03-26 18:40:26 +0700 |
| commit | b6d04fc7cc5de3370d2d8255f2b3e43f6bf9c80d (patch) | |
| tree | 1ee0d7aeed7c411ad495a14b52f14ccb162ecc58 /src/qt/bitcoin.cpp | |
| parent | Qt: When multiple wallets are used, include in notifications the name (diff) | |
| download | discoin-b6d04fc7cc5de3370d2d8255f2b3e43f6bf9c80d.tar.xz discoin-b6d04fc7cc5de3370d2d8255f2b3e43f6bf9c80d.zip | |
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 424d82ae1..df1be35c8 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; } |