From b6d04fc7cc5de3370d2d8255f2b3e43f6bf9c80d Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Thu, 12 Oct 2017 07:22:48 +0000 Subject: Qt: Get wallet name from WalletModel rather than passing it around --- src/qt/bitcoin.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/qt/bitcoin.cpp') 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; } -- cgit v1.2.3