From f95108155da73eafa64ed8c3e548e3bfce8978c8 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Wed, 13 Jan 2010 21:23:02 +0000 Subject: [PATCH] - Maximum value for rate limiting in peer list is now taken from program preferences --- src/peerlistwidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/peerlistwidget.cpp b/src/peerlistwidget.cpp index 848543933..cecdf2218 100644 --- a/src/peerlistwidget.cpp +++ b/src/peerlistwidget.cpp @@ -191,7 +191,7 @@ void PeerListWidget::limitUpRateSelectedPeers(QStringList peer_ips) { QTorrentHandle h = properties->getCurrentTorrent(); if(!h.is_valid()) return; 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; foreach(const QString &ip, peer_ips) { 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(); if(!h.is_valid()) return; 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; foreach(const QString &ip, peer_ips) { libtorrent::asio::ip::tcp::endpoint ep = peerEndpoints.value(ip, libtorrent::asio::ip::tcp::endpoint());