Skip to content

Commit

Permalink
gui: use SPACE constant in rpcconsole.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatack committed Apr 28, 2021
1 parent f38b2d8 commit 1e20771
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/qt/rpcconsole.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -626,10 +626,10 @@ void RPCConsole::setClientModel(ClientModel *model, int bestblock_height, int64_
// create peer table context menu
peersTableContextMenu = new QMenu(this);
peersTableContextMenu->addAction(tr("Disconnect"), this, &RPCConsole::disconnectSelectedNode);
peersTableContextMenu->addAction(ts.ban_for + " " + tr("1 hour"), [this] { banSelectedNode(60 * 60); });
peersTableContextMenu->addAction(ts.ban_for + " " + tr("1 day"), [this] { banSelectedNode(60 * 60 * 24); });
peersTableContextMenu->addAction(ts.ban_for + " " + tr("1 week"), [this] { banSelectedNode(60 * 60 * 24 * 7); });
peersTableContextMenu->addAction(ts.ban_for + " " + tr("1 year"), [this] { banSelectedNode(60 * 60 * 24 * 365); });
peersTableContextMenu->addAction(ts.ban_for + SPACE + tr("1 hour"), [this] { banSelectedNode(60 * 60); });
peersTableContextMenu->addAction(ts.ban_for + SPACE + tr("1 day"), [this] { banSelectedNode(60 * 60 * 24); });
peersTableContextMenu->addAction(ts.ban_for + SPACE + tr("1 week"), [this] { banSelectedNode(60 * 60 * 24 * 7); });
peersTableContextMenu->addAction(ts.ban_for + SPACE + tr("1 year"), [this] { banSelectedNode(60 * 60 * 24 * 365); });
connect(ui->peerWidget, &QTableView::customContextMenuRequested, this, &RPCConsole::showPeersTableContextMenu);

// peer table signal handling - update peer details when selecting new node
Expand Down Expand Up @@ -842,8 +842,8 @@ void RPCConsole::message(int category, const QString &message, bool html)
void RPCConsole::updateNetworkState()
{
QString connections = QString::number(clientModel->getNumConnections()) + " (";
connections += tr("In:") + " " + QString::number(clientModel->getNumConnections(CONNECTIONS_IN)) + " / ";
connections += tr("Out:") + " " + QString::number(clientModel->getNumConnections(CONNECTIONS_OUT)) + ")";
connections += tr("In:") + SPACE + QString::number(clientModel->getNumConnections(CONNECTIONS_IN)) + " / ";
connections += tr("Out:") + SPACE + QString::number(clientModel->getNumConnections(CONNECTIONS_OUT)) + ")";

if(!clientModel->node().getNetworkActive()) {
connections += " (" + tr("Network activity disabled") + ")";
Expand Down Expand Up @@ -1028,7 +1028,7 @@ void RPCConsole::updateDetailWidget()
}
const auto stats = selected_peers.first().data(PeerTableModel::StatsRole).value<CNodeCombinedStats*>();
// update the detail ui with latest node information
QString peerAddrDetails(QString::fromStdString(stats->nodeStats.addrName) + " ");
QString peerAddrDetails(QString::fromStdString(stats->nodeStats.addrName) + SPACE);
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));
Expand Down

0 comments on commit 1e20771

Please sign in to comment.