qt: Factor out WalletModel::getDisplayName()

This commit is contained in:
João Barbosa
2018-06-25 22:22:01 +01:00
parent 9c64278e1a
commit d2a1adffeb
4 changed files with 11 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011-2018 The Bitcoin Core developers
// Copyright (c) 2011-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -578,6 +578,12 @@ QString WalletModel::getWalletName() const
return QString::fromStdString(m_wallet->getWalletName());
}
QString WalletModel::getDisplayName() const
{
const QString name = getWalletName();
return name.isEmpty() ? "["+tr("default wallet")+"]" : name;
}
bool WalletModel::isMultiwallet()
{
return m_node.getWallets().size() > 1;