From 5cc5552d9b994ede4fb44def755576d0ffaa6d92 Mon Sep 17 00:00:00 2001 From: Gabriele Date: Sat, 8 Aug 2015 16:23:30 +0200 Subject: [PATCH] Use infinity symbol rather than -1 for nb_connections --- src/gui/properties/propertieswidget.cpp | 2 +- src/webui/www/public/scripts/prop-general.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/properties/propertieswidget.cpp b/src/gui/properties/propertieswidget.cpp index ebf0a45c9..a7451e545 100644 --- a/src/gui/properties/propertieswidget.cpp +++ b/src/gui/properties/propertieswidget.cpp @@ -379,7 +379,7 @@ void PropertiesWidget::loadDynamicData() { lbl_elapsed->setText(elapsed_txt); lbl_connections->setText(tr("%1 (%2 max)", "%1 and %2 are numbers, e.g. 3 (10 max)") - .arg(QString::number(m_torrent->connectionsCount())) + .arg(m_torrent->connectionsCount() < 0 ? QString::fromUtf8(C_INFINITY) : QString::number(m_torrent->connectionsCount())) .arg(QString::number(m_torrent->connectionsLimit()))); label_eta_val->setText(Utils::Misc::userFriendlyDuration(m_torrent->eta())); diff --git a/src/webui/www/public/scripts/prop-general.js b/src/webui/www/public/scripts/prop-general.js index b9c95a59e..4e80ee15d 100644 --- a/src/webui/www/public/scripts/prop-general.js +++ b/src/webui/www/public/scripts/prop-general.js @@ -68,7 +68,7 @@ var loadTorrentData = function() { temp = "QBT_TR(%1 (%2 max))QBT_TR" .replace("%1", data.nb_connections) - .replace("%2", data.nb_connections_limit) + .replace("%2", data.nb_connections_limit < 0 ? "∞" : data.nb_connections_limit) $('nb_connections').set('html', temp); temp = "QBT_TR(%1 (%2 this session))QBT_TR"