Skip to content

Commit df6a2e1

Browse files
committed
GUI/Peers: Drop redundant Network column
Network addresses already very obviously imply a specific network, so naming the network separately just wastes space
1 parent 6d8db31 commit df6a2e1

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

‎src/qt/peertablemodel.h‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ class PeerTableModel : public QAbstractTableModel
5454
Direction,
5555
Address,
5656
ConnectionType,
57-
Network,
5857
Ping,
5958
Sent,
6059
Received,
61-
Subversion
60+
Subversion,
61+
Network, // Not used, just kept at the end to avoid excessive code removal
6262
};
6363

6464
enum {
@@ -100,9 +100,6 @@ public Q_SLOTS:
100100
/*: Title of Peers Table column which describes the type of
101101
peer connection. The "type" describes why the connection exists. */
102102
tr("Type"),
103-
/*: Title of Peers Table column which states the network the peer
104-
connected through. */
105-
tr("Network"),
106103
/*: Title of Peers Table column which indicates the current latency
107104
of the connection with the peer. */
108105
tr("Ping"),

‎src/qt/rpcconsole.cpp‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,6 @@ void RPCConsole::setClientModel(ClientModel *model, int bestblock_height, int64_
705705
ui->peerWidget->setColumnWidth(PeerTableModel::Address, ADDRESS_COLUMN_WIDTH);
706706
ui->peerWidget->setColumnWidth(PeerTableModel::ConnectionType, GUIUtil::TextWidth(fm, GUIUtil::ConnectionTypeToQString(ConnectionType::ADDR_FETCH /* TODO: Find the WIDEST string? */, /*prepend_direction=*/false)));
707707
const auto bytesize_width = GUIUtil::TextWidth(fm, GUIUtil::formatBytes(999'000'000'000) + QStringLiteral("xx"));
708-
ui->peerWidget->setColumnWidth(PeerTableModel::Network, GUIUtil::TextWidth(fm, qvariant_cast<QString>(model->peerTableSortProxy()->headerData(PeerTableModel::ColumnIndex::Network, Qt::Horizontal, Qt::DisplayRole)) /* TODO: Find the WIDEST string? */ + QStringLiteral("x")));
709708
ui->peerWidget->setColumnWidth(PeerTableModel::Subversion, SUBVERSION_COLUMN_WIDTH);
710709
ui->peerWidget->setColumnWidth(PeerTableModel::Ping, PING_COLUMN_WIDTH);
711710
ui->peerWidget->setColumnWidth(PeerTableModel::Sent, bytesize_width);

0 commit comments

Comments
 (0)