mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-30 03:28:41 -07:00
Remove speed limit checkbox in Options dialog
This unifies speed limit UI elements throughout the program.
This commit is contained in:
parent
a57a026f4c
commit
3fa5358c3f
7 changed files with 121 additions and 348 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue