Importance code refactoring related to the "preferences" code - Greatly improves performance

This commit is contained in:
Christophe Dumez 2010-11-16 20:34:31 +00:00
commit e5032a52c4
26 changed files with 976 additions and 1142 deletions

View file

@ -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"));