Use c++11 enum classes instead of macros.

This commit is contained in:
Vladimir Golovnev (Glassez)
2015-08-26 20:45:31 +03:00
parent 12d9898b5d
commit b519700e33
5 changed files with 16 additions and 32 deletions

View File

@@ -974,12 +974,12 @@ void Preferences::setGlobalMaxRatio(qreal ratio)
MaxRatioAction Preferences::getMaxRatioAction() const
{
return value("Preferences/Bittorrent/MaxRatioAction", MaxRatioAction::Pause).toInt();
return value("Preferences/Bittorrent/MaxRatioAction", QVariant::fromValue(MaxRatioAction::Pause)).value<MaxRatioAction>();
}
void Preferences::setMaxRatioAction(MaxRatioAction act)
{
setValue("Preferences/Bittorrent/MaxRatioAction", act);
setValue("Preferences/Bittorrent/MaxRatioAction", QVariant::fromValue(act));
}
// IP Filter