aboutsummaryrefslogtreecommitdiff
path: root/src/qt/peertablemodel.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2014-08-06 15:37:14 +0200
committerWladimir J. van der Laan <[email protected]>2014-08-06 15:48:01 +0200
commit9db9257ac4520210470922f12a463e9d3791c9ec (patch)
tree1ad8570d641c764c9f1bb427ce18aca7486d3065 /src/qt/peertablemodel.cpp
parentMerge pull request #4626 (diff)
parent[Qt] format ping times in peers tab as ms (diff)
downloaddiscoin-9db9257ac4520210470922f12a463e9d3791c9ec.tar.xz
discoin-9db9257ac4520210470922f12a463e9d3791c9ec.zip
Merge pull request #4629
ead6737 [Qt] format ping times in peers tab as ms (Philip Kaufmann)
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 4c650bdec..54b46867e 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();
}