diff --git a/src/preferences/options_imp.cpp b/src/preferences/options_imp.cpp index 3f83a8db4..abf591f36 100644 --- a/src/preferences/options_imp.cpp +++ b/src/preferences/options_imp.cpp @@ -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 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()); diff --git a/src/preferences/preferences.h b/src/preferences/preferences.h index ff38ee753..458380a88 100644 --- a/src/preferences/preferences.h +++ b/src/preferences/preferences.h @@ -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: } int getGlobalUploadLimit() const { - return value(QString::fromUtf8("Preferences/Connection/GlobalUPLimit"), 50).toInt(); + return value("Preferences/Connection/GlobalUPLimit", 50).toInt(); } void setGlobalUploadLimit(int limit) {