diff options
| author | Philip Kaufmann <[email protected]> | 2014-08-04 16:25:21 +0200 |
|---|---|---|
| committer | Philip Kaufmann <[email protected]> | 2014-08-04 19:23:57 +0200 |
| commit | ead6737b87ee238aa0c7f81f9186c62f15ab8d67 (patch) | |
| tree | 900d2c10961a26a59cb9fac4bd68d5eed58c4c6d /src/qt/peertablemodel.cpp | |
| parent | Merge pull request #4285 (diff) | |
| download | discoin-ead6737b87ee238aa0c7f81f9186c62f15ab8d67.tar.xz discoin-ead6737b87ee238aa0c7f81f9186c62f15ab8d67.zip | |
[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.cpp | 7 |
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(); } |