Browse Source

Code clean up

adaptive-webui-19844
Christophe Dumez 14 years ago
parent
commit
f9ece8b447
  1. 5
      src/preferences/options_imp.cpp
  2. 4
      src/preferences/preferences.h

5
src/preferences/options_imp.cpp

@ -360,8 +360,9 @@ void options_imp::saveOptions(){ @@ -360,8 +360,9 @@ void options_imp::saveOptions(){
pref.setSessionPort(getPort());
pref.setUPnPEnabled(isUPnPEnabled());
pref.setNATPMPEnabled(isNATPMPEnabled());
pref.setGlobalDownloadLimit(getGlobalBandwidthLimits().first);
pref.setGlobalUploadLimit(getGlobalBandwidthLimits().second);
const QPair<int, int> down_up_limit = getGlobalBandwidthLimits();
pref.setGlobalDownloadLimit(down_up_limit.first);
pref.setGlobalUploadLimit(down_up_limit.second);
pref.setAltGlobalDownloadLimit(spinDownloadLimitAlt->value());
pref.setAltGlobalUploadLimit(spinUploadLimitAlt->value());
pref.setSchedulerEnabled(check_schedule->isChecked());

4
src/preferences/preferences.h

@ -344,7 +344,7 @@ public: @@ -344,7 +344,7 @@ public:
}
int getGlobalDownloadLimit() const {
return value(QString::fromUtf8("Preferences/Connection/GlobalDLLimit"), -1).toInt();
return value("Preferences/Connection/GlobalDLLimit", -1).toInt();
}
void setGlobalDownloadLimit(int limit) {
@ -353,7 +353,7 @@ public: @@ -353,7 +353,7 @@ public:
}
int getGlobalUploadLimit() const {
return value(QString::fromUtf8("Preferences/Connection/GlobalUPLimit"), 50).toInt();
return value("Preferences/Connection/GlobalUPLimit", 50).toInt();
}
void setGlobalUploadLimit(int limit) {

Loading…
Cancel
Save