gui: rename peer tab column headers, initialize in .h

This commit is contained in:
Hennadii Stepanov 2020-12-25 16:41:26 +01:00 committed by Jon Atack
parent 05c08c696a
commit 9136953073
No known key found for this signature in database
GPG key ID: 4F5721B3D0E3921D
3 changed files with 2 additions and 3 deletions

View file

@ -106,7 +106,6 @@ PeerTableModel::PeerTableModel(interfaces::Node& node, QObject* parent) :
m_node(node),
timer(nullptr)
{
columns << tr("NodeId") << tr("Node/Service") << tr("Network") << tr("Ping") << tr("Sent") << tr("Received") << tr("User Agent");
priv.reset(new PeerTablePriv());
// set up timer for auto refresh

View file

@ -83,7 +83,7 @@ public Q_SLOTS:
private:
interfaces::Node& m_node;
QStringList columns;
const QStringList columns{tr("Peer Id"), tr("Address"), tr("Network"), tr("Ping"), tr("Sent"), tr("Received"), tr("User Agent")};
std::unique_ptr<PeerTablePriv> priv;
QTimer *timer;
};

View file

@ -1092,7 +1092,7 @@ void RPCConsole::updateDetailWidget()
const CNodeCombinedStats *stats = clientModel->getPeerTableModel()->getNodeStats(selected_rows.first().row());
// update the detail ui with latest node information
QString peerAddrDetails(QString::fromStdString(stats->nodeStats.addrName) + " ");
peerAddrDetails += tr("(node id: %1)").arg(QString::number(stats->nodeStats.nodeid));
peerAddrDetails += tr("(peer id: %1)").arg(QString::number(stats->nodeStats.nodeid));
if (!stats->nodeStats.addrLocal.empty())
peerAddrDetails += "<br />" + tr("via %1").arg(QString::fromStdString(stats->nodeStats.addrLocal));
ui->peerHeading->setText(peerAddrDetails);