mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
- Fixed per torrent speed limiting
- A lot of cleanup in speed limiting dialog
This commit is contained in:
parent
490ef19e64
commit
5ffcf5a9dc
10 changed files with 278 additions and 296 deletions
|
@ -182,11 +182,23 @@ public:
|
|||
return settings.value(QString::fromUtf8("Preferences/Connection/GlobalDLLimit"), -1).toInt();
|
||||
}
|
||||
|
||||
static void setGlobalDownloadLimit(int limit) {
|
||||
QSettings settings("qBittorrent", "qBittorrent");
|
||||
if(limit == 0) limit = -1;
|
||||
settings.setValue("Preferences/Connection/GlobalDLLimit", limit);
|
||||
}
|
||||
|
||||
static int getGlobalUploadLimit() {
|
||||
QSettings settings("qBittorrent", "qBittorrent");
|
||||
return settings.value(QString::fromUtf8("Preferences/Connection/GlobalUPLimit"), -1).toInt();
|
||||
}
|
||||
|
||||
static void setGlobalUploadLimit(int limit) {
|
||||
QSettings settings("qBittorrent", "qBittorrent");
|
||||
if(limit == 0) limit = -1;
|
||||
settings.setValue("Preferences/Connection/GlobalUPLimit", limit);
|
||||
}
|
||||
|
||||
static bool resolvePeerCountries() {
|
||||
QSettings settings("qBittorrent", "qBittorrent");
|
||||
return settings.value(QString::fromUtf8("Preferences/Connection/ResolvePeerCountries"), false).toBool();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue