mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
gui: add Direction column to peers tab
Co-authored-by: Jarol Rodriguez <jarolrod@tutanota.com>
This commit is contained in:
committed by
Jarol Rodriguez
parent
5c041cb348
commit
6971e790c3
@@ -113,8 +113,13 @@ QVariant PeerTableModel::data(const QModelIndex &index, int role) const
|
||||
case NetNodeId:
|
||||
return (qint64)rec->nodeStats.nodeid;
|
||||
case Address:
|
||||
// prepend to peer address down-arrow symbol for inbound connection and up-arrow for outbound connection
|
||||
return QString::fromStdString((rec->nodeStats.fInbound ? "↓ " : "↑ ") + rec->nodeStats.addrName);
|
||||
return QString::fromStdString(rec->nodeStats.addrName);
|
||||
case Direction:
|
||||
return QString(rec->nodeStats.fInbound ?
|
||||
//: An Inbound Connection from a Peer.
|
||||
tr("Inbound") :
|
||||
//: An Outbound Connection to a Peer.
|
||||
tr("Outbound"));
|
||||
case ConnectionType:
|
||||
return GUIUtil::ConnectionTypeToQString(rec->nodeStats.m_conn_type, /* prepend_direction */ false);
|
||||
case Network:
|
||||
@@ -134,6 +139,7 @@ QVariant PeerTableModel::data(const QModelIndex &index, int role) const
|
||||
case NetNodeId:
|
||||
case Address:
|
||||
return {};
|
||||
case Direction:
|
||||
case ConnectionType:
|
||||
case Network:
|
||||
return QVariant(Qt::AlignCenter);
|
||||
|
||||
Reference in New Issue
Block a user