aboutsummaryrefslogtreecommitdiff
path: root/src/qt/transactiontablemodel.cpp
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-06-18 15:30:15 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-06-18 15:30:15 +0300
commit25f3554351a99a0a695fbd2a6a0f293b3adc3d98 (patch)
tree496f3447df4088195a8a699a843ca71bf0b8dd46 /src/qt/transactiontablemodel.cpp
parent343c0bfbf1e56dd4b2919bc98215367922926f3c (diff)
scripted-diff: Make SeparatorStyle a scoped enum
-BEGIN VERIFY SCRIPT- # General rename helper: $1 -> $2 rename_global() { sed -i "s/\<$1\>/$2/g" $(git grep -l "$1"); } # Helper to rename SeparatorStyle enumerators rename_value() { sed -i "s/ $1/ $2/g" src/qt/bitcoinunits.h; rename_global $1 "SeparatorStyle::$2"; } rename_global 'enum SeparatorStyle' 'enum class SeparatorStyle' rename_value 'separatorNever' 'NEVER' rename_value 'separatorStandard' 'STANDARD' rename_value 'separatorAlways' 'ALWAYS' -END VERIFY SCRIPT-
Diffstat (limited to 'src/qt/transactiontablemodel.cpp')
-rw-r--r--src/qt/transactiontablemodel.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp
index 04eb1ae706..327a489488 100644
--- a/src/qt/transactiontablemodel.cpp
+++ b/src/qt/transactiontablemodel.cpp
@@ -524,7 +524,7 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const
case ToAddress:
return formatTxToAddress(rec, false);
case Amount:
- return formatTxAmount(rec, true, BitcoinUnits::separatorAlways);
+ return formatTxAmount(rec, true, BitcoinUnits::SeparatorStyle::ALWAYS);
}
break;
case Qt::EditRole:
@@ -614,14 +614,14 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const
details.append(QString::fromStdString(rec->address));
details.append(" ");
}
- details.append(formatTxAmount(rec, false, BitcoinUnits::separatorNever));
+ details.append(formatTxAmount(rec, false, BitcoinUnits::SeparatorStyle::NEVER));
return details;
}
case ConfirmedRole:
return rec->status.status == TransactionStatus::Status::Confirming || rec->status.status == TransactionStatus::Status::Confirmed;
case FormattedAmountRole:
// Used for copy/export, so don't include separators
- return formatTxAmount(rec, false, BitcoinUnits::separatorNever);
+ return formatTxAmount(rec, false, BitcoinUnits::SeparatorStyle::NEVER);
case StatusRole:
return rec->status.status;
}