aboutsummaryrefslogtreecommitdiff
path: root/src/qt/peertablemodel.cpp
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2014-08-04 16:25:21 +0200
committerPhilip Kaufmann <phil.kaufmann@t-online.de>2014-08-04 19:23:57 +0200
commitead6737b87ee238aa0c7f81f9186c62f15ab8d67 (patch)
tree900d2c10961a26a59cb9fac4bd68d5eed58c4c6d /src/qt/peertablemodel.cpp
parent1913302fb7b1659feb72f3a532f5c5be0e8391e3 (diff)
downloadbitcoin-ead6737b87ee238aa0c7f81f9186c62f15ab8d67.tar.xz
[Qt] format ping times in peers tab as ms
- also align ping times to the right
Diffstat (limited to 'src/qt/peertablemodel.cpp')
-rw-r--r--src/qt/peertablemodel.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/qt/peertablemodel.cpp b/src/qt/peertablemodel.cpp
index 4c650bdec9..54b46867ea 100644
--- a/src/qt/peertablemodel.cpp
+++ b/src/qt/peertablemodel.cpp
@@ -152,8 +152,7 @@ QVariant PeerTableModel::data(const QModelIndex &index, int role) const
CNodeCombinedStats *rec = static_cast<CNodeCombinedStats*>(index.internalPointer());
- if(role == Qt::DisplayRole)
- {
+ if (role == Qt::DisplayRole) {
switch(index.column())
{
case Address:
@@ -163,7 +162,11 @@ QVariant PeerTableModel::data(const QModelIndex &index, int role) const
case Ping:
return GUIUtil::formatPingTime(rec->nodeStats.dPingTime);
}
+ } else if (role == Qt::TextAlignmentRole) {
+ if (index.column() == Ping)
+ return (int)(Qt::AlignRight | Qt::AlignVCenter);
}
+
return QVariant();
}