mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 23:17:21 -06:00
Remove speed limit checkbox in Options dialog
This unifies speed limit UI elements throughout the program.
This commit is contained in:
@@ -206,18 +206,19 @@ void StatusBar::updateSpeedLabels()
|
||||
{
|
||||
const BitTorrent::SessionStatus &sessionStatus = BitTorrent::Session::instance()->status();
|
||||
|
||||
QString speedLbl = Utils::Misc::friendlyUnit(sessionStatus.payloadDownloadRate, true);
|
||||
int speedLimit = BitTorrent::Session::instance()->downloadSpeedLimit();
|
||||
if (speedLimit)
|
||||
speedLbl += " [" + Utils::Misc::friendlyUnit(speedLimit, true) + ']';
|
||||
speedLbl += " (" + Utils::Misc::friendlyUnit(sessionStatus.totalPayloadDownload) + ')';
|
||||
m_dlSpeedLbl->setText(speedLbl);
|
||||
speedLimit = BitTorrent::Session::instance()->uploadSpeedLimit();
|
||||
speedLbl = Utils::Misc::friendlyUnit(sessionStatus.payloadUploadRate, true);
|
||||
if (speedLimit)
|
||||
speedLbl += " [" + Utils::Misc::friendlyUnit(speedLimit, true) + ']';
|
||||
speedLbl += " (" + Utils::Misc::friendlyUnit(sessionStatus.totalPayloadUpload) + ')';
|
||||
m_upSpeedLbl->setText(speedLbl);
|
||||
QString dlSpeedLbl = Utils::Misc::friendlyUnit(sessionStatus.payloadDownloadRate, true);
|
||||
const int dlSpeedLimit = BitTorrent::Session::instance()->downloadSpeedLimit();
|
||||
if (dlSpeedLimit > 0)
|
||||
dlSpeedLbl += " [" + Utils::Misc::friendlyUnit(dlSpeedLimit, true) + ']';
|
||||
dlSpeedLbl += " (" + Utils::Misc::friendlyUnit(sessionStatus.totalPayloadDownload) + ')';
|
||||
m_dlSpeedLbl->setText(dlSpeedLbl);
|
||||
|
||||
QString upSpeedLbl = Utils::Misc::friendlyUnit(sessionStatus.payloadUploadRate, true);
|
||||
const int upSpeedLimit = BitTorrent::Session::instance()->uploadSpeedLimit();
|
||||
if (upSpeedLimit > 0)
|
||||
upSpeedLbl += " [" + Utils::Misc::friendlyUnit(upSpeedLimit, true) + ']';
|
||||
upSpeedLbl += " (" + Utils::Misc::friendlyUnit(sessionStatus.totalPayloadUpload) + ')';
|
||||
m_upSpeedLbl->setText(upSpeedLbl);
|
||||
}
|
||||
|
||||
void StatusBar::refresh()
|
||||
|
||||
Reference in New Issue
Block a user