mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 05:13:30 -07:00
- Maximum value for rate limiting in peer list is now taken from program preferences
This commit is contained in:
parent
75f75854c2
commit
f95108155d
1 changed files with 2 additions and 2 deletions
|
@ -191,7 +191,7 @@ void PeerListWidget::limitUpRateSelectedPeers(QStringList peer_ips) {
|
||||||
QTorrentHandle h = properties->getCurrentTorrent();
|
QTorrentHandle h = properties->getCurrentTorrent();
|
||||||
if(!h.is_valid()) return;
|
if(!h.is_valid()) return;
|
||||||
bool ok=false;
|
bool ok=false;
|
||||||
long limit = SpeedLimitDialog::askSpeedLimit(&ok, tr("Upload rate limiting"), -1);
|
long limit = SpeedLimitDialog::askSpeedLimit(&ok, tr("Upload rate limiting"), -1, Preferences::getGlobalUploadLimit()*1024.);
|
||||||
if(!ok) return;
|
if(!ok) return;
|
||||||
foreach(const QString &ip, peer_ips) {
|
foreach(const QString &ip, peer_ips) {
|
||||||
libtorrent::asio::ip::tcp::endpoint ep = peerEndpoints.value(ip, libtorrent::asio::ip::tcp::endpoint());
|
libtorrent::asio::ip::tcp::endpoint ep = peerEndpoints.value(ip, libtorrent::asio::ip::tcp::endpoint());
|
||||||
|
@ -212,7 +212,7 @@ void PeerListWidget::limitDlRateSelectedPeers(QStringList peer_ips) {
|
||||||
QTorrentHandle h = properties->getCurrentTorrent();
|
QTorrentHandle h = properties->getCurrentTorrent();
|
||||||
if(!h.is_valid()) return;
|
if(!h.is_valid()) return;
|
||||||
bool ok=false;
|
bool ok=false;
|
||||||
long limit = SpeedLimitDialog::askSpeedLimit(&ok, tr("Download rate limiting"), -1);
|
long limit = SpeedLimitDialog::askSpeedLimit(&ok, tr("Download rate limiting"), -1, Preferences::getGlobalDownloadLimit()*1024.);
|
||||||
if(!ok) return;
|
if(!ok) return;
|
||||||
foreach(const QString &ip, peer_ips) {
|
foreach(const QString &ip, peer_ips) {
|
||||||
libtorrent::asio::ip::tcp::endpoint ep = peerEndpoints.value(ip, libtorrent::asio::ip::tcp::endpoint());
|
libtorrent::asio::ip::tcp::endpoint ep = peerEndpoints.value(ip, libtorrent::asio::ip::tcp::endpoint());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue