aboutsummaryrefslogtreecommitdiff
path: root/src/qt/walletmodel.cpp
diff options
context:
space:
mode:
authorJoão Barbosa <[email protected]>2018-06-25 22:22:01 +0100
committerJoão Barbosa <[email protected]>2019-01-04 15:22:13 +0000
commitd2a1adffebee86763fafc6f3ed2722f7038654c7 (patch)
tree01599ba49363bc0cc26775448fe471d2b7156eca /src/qt/walletmodel.cpp
parentMerge #13910: Log progress while verifying blocks at level 4 (diff)
downloaddiscoin-d2a1adffebee86763fafc6f3ed2722f7038654c7.tar.xz
discoin-d2a1adffebee86763fafc6f3ed2722f7038654c7.zip
qt: Factor out WalletModel::getDisplayName()
Diffstat (limited to 'src/qt/walletmodel.cpp')
-rw-r--r--src/qt/walletmodel.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index ba16fdd5e..b7fa63649 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -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;