diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-05-03 11:16:06 +0300 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-05-15 19:10:38 +0300 |
commit | 3fd3a0fc87a81d42755246830124833e9ca3f0a9 (patch) | |
tree | 137ba7bb8d8d91fc0e524b27070635f925038076 /src/qt/transactiontablemodel.cpp | |
parent | b8593616dc2ab5b8f81edd8b2408d400e3b696cd (diff) |
qt, build: Optimize string concatenation
The defined QT_USE_QSTRINGBUILDER macro means using the QStringBuilder
for efficient string concatenation in all Qt code by default.
Diffstat (limited to 'src/qt/transactiontablemodel.cpp')
-rw-r--r-- | src/qt/transactiontablemodel.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp index a7556eed04..ed2ef8e626 100644 --- a/src/qt/transactiontablemodel.cpp +++ b/src/qt/transactiontablemodel.cpp @@ -25,6 +25,8 @@ #include <QDateTime> #include <QDebug> #include <QIcon> +#include <QLatin1Char> +#include <QLatin1String> #include <QList> @@ -409,9 +411,9 @@ QVariant TransactionTableModel::txAddressDecoration(const TransactionRecord *wtx QString TransactionTableModel::formatTxToAddress(const TransactionRecord *wtx, bool tooltip) const { QString watchAddress; - if (tooltip) { + if (tooltip && wtx->involvesWatchAddress) { // Mark transactions involving watch-only addresses by adding " (watch-only)" - watchAddress = wtx->involvesWatchAddress ? QString(" (") + tr("watch-only") + QString(")") : ""; + watchAddress = QLatin1String(" (") + tr("watch-only") + QLatin1Char(')'); } switch(wtx->type) |