mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-07 21:28:40 +02: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
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user