aboutsummaryrefslogtreecommitdiff
path: root/src/qt/transactiontablemodel.cpp
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2013-08-24 15:07:17 +0200
committerPhilip Kaufmann <phil.kaufmann@t-online.de>2013-08-29 10:38:51 +0200
commitbdd0c59ab0b412b3e8595bd95f635f975e22bb85 (patch)
tree3c54fa2eedf564de1a90cbfb2158b9ecc5dcb9ff /src/qt/transactiontablemodel.cpp
parentff33a3470dd1d1446549d02609c991c0490e0fdf (diff)
downloadbitcoin-bdd0c59ab0b412b3e8595bd95f635f975e22bb85.tar.xz
Bitcoin-Qt: fixes for using display unit from options
- extend PaymentServer with setOptionsModel() and rework initNetManager() to make use of that - fix all other places in the code to use display unit from options and no hard-coded unit
Diffstat (limited to 'src/qt/transactiontablemodel.cpp')
-rw-r--r--src/qt/transactiontablemodel.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp
index baf1e16483..625e657295 100644
--- a/src/qt/transactiontablemodel.cpp
+++ b/src/qt/transactiontablemodel.cpp
@@ -48,11 +48,12 @@ struct TxLessThan
class TransactionTablePriv
{
public:
- TransactionTablePriv(CWallet *wallet, TransactionTableModel *parent):
- wallet(wallet),
- parent(parent)
+ TransactionTablePriv(CWallet *wallet, TransactionTableModel *parent) :
+ wallet(wallet),
+ parent(parent)
{
}
+
CWallet *wallet;
TransactionTableModel *parent;
@@ -200,19 +201,18 @@ public:
}
}
- QString describe(TransactionRecord *rec)
+ QString describe(TransactionRecord *rec, int unit)
{
{
LOCK(wallet->cs_wallet);
std::map<uint256, CWalletTx>::iterator mi = wallet->mapWallet.find(rec->hash);
if(mi != wallet->mapWallet.end())
{
- return TransactionDesc::toHTML(wallet, mi->second);
+ return TransactionDesc::toHTML(wallet, mi->second, unit);
}
}
return QString("");
}
-
};
TransactionTableModel::TransactionTableModel(CWallet* wallet, WalletModel *parent):
@@ -561,7 +561,7 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const
case DateRole:
return QDateTime::fromTime_t(static_cast<uint>(rec->time));
case LongDescriptionRole:
- return priv->describe(rec);
+ return priv->describe(rec, walletModel->getOptionsModel()->getDisplayUnit());
case AddressRole:
return QString::fromStdString(rec->address);
case LabelRole: