[Qt] show number of in/out connections in debug console

This commit is contained in:
Philip Kaufmann
2014-02-16 19:48:27 +01:00
parent aefbf6e30c
commit 8e29623077
3 changed files with 28 additions and 4 deletions

View File

@@ -349,7 +349,14 @@ void RPCConsole::message(int category, const QString &message, bool html)
void RPCConsole::setNumConnections(int count)
{
ui->numberOfConnections->setText(QString::number(count));
if (!clientModel)
return;
QString connections = QString::number(count) + " (";
connections += tr("In:") + " " + QString::number(clientModel->getNumConnections(CONNECTIONS_IN)) + " / ";
connections += tr("Out:") + " " + QString::number(clientModel->getNumConnections(CONNECTIONS_OUT)) + ")";
ui->numberOfConnections->setText(connections);
}
void RPCConsole::setNumBlocks(int count, int countOfPeers)