mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
gui: add Age column to peers tab
Co-authored-by: Jon Atack <jon@atack.com>
This commit is contained in:
@@ -71,6 +71,8 @@ QVariant PeerTableModel::data(const QModelIndex& index, int role) const
|
||||
switch (column) {
|
||||
case NetNodeId:
|
||||
return (qint64)rec->nodeStats.nodeid;
|
||||
case Age:
|
||||
return GUIUtil::FormatPeerAge(rec->nodeStats.m_connected);
|
||||
case Address:
|
||||
return QString::fromStdString(rec->nodeStats.m_addr_name);
|
||||
case Direction:
|
||||
@@ -96,6 +98,7 @@ QVariant PeerTableModel::data(const QModelIndex& index, int role) const
|
||||
} else if (role == Qt::TextAlignmentRole) {
|
||||
switch (column) {
|
||||
case NetNodeId:
|
||||
case Age:
|
||||
return QVariant(Qt::AlignRight | Qt::AlignVCenter);
|
||||
case Address:
|
||||
return {};
|
||||
|
||||
Reference in New Issue
Block a user