mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 12:59:56 -07:00
Importance code refactoring related to the "preferences" code - Greatly improves performance
This commit is contained in:
parent
a640b08414
commit
e5032a52c4
26 changed files with 976 additions and 1142 deletions
|
@ -473,13 +473,13 @@ void HttpConnection::respondCommand(QString command)
|
|||
qlonglong limit = parser.post("limit").toLongLong();
|
||||
if(limit == 0) limit = -1;
|
||||
QBtSession::instance()->getSession()->set_upload_rate_limit(limit);
|
||||
Preferences::setGlobalUploadLimit(limit/1024.);
|
||||
Preferences().setGlobalUploadLimit(limit/1024.);
|
||||
}
|
||||
if(command == "setGlobalDlLimit") {
|
||||
qlonglong limit = parser.post("limit").toLongLong();
|
||||
if(limit == 0) limit = -1;
|
||||
QBtSession::instance()->getSession()->set_download_rate_limit(limit);
|
||||
Preferences::setGlobalDownloadLimit(limit/1024.);
|
||||
Preferences().setGlobalDownloadLimit(limit/1024.);
|
||||
}
|
||||
if(command == "pause") {
|
||||
emit pauseTorrent(parser.post("hash"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue