mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Use c++11 enum classes instead of macros.
This commit is contained in:
parent
12d9898b5d
commit
b519700e33
5 changed files with 16 additions and 32 deletions
|
@ -141,7 +141,7 @@ QByteArray prefjson::getPreferences()
|
|||
// Share Ratio Limiting
|
||||
data["max_ratio_enabled"] = (pref->getGlobalMaxRatio() >= 0.);
|
||||
data["max_ratio"] = pref->getGlobalMaxRatio();
|
||||
data["max_ratio_act"] = pref->getMaxRatioAction();
|
||||
data["max_ratio_act"] = QVariant::fromValue(pref->getMaxRatioAction());
|
||||
|
||||
// Web UI
|
||||
// Language
|
||||
|
@ -337,7 +337,7 @@ void prefjson::setPreferences(const QString& json)
|
|||
else
|
||||
pref->setGlobalMaxRatio(-1);
|
||||
if (m.contains("max_ratio_act"))
|
||||
pref->setMaxRatioAction(m["max_ratio_act"].toInt());
|
||||
pref->setMaxRatioAction(m["max_ratio_act"].value<MaxRatioAction>());
|
||||
|
||||
// Web UI
|
||||
// Language
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue