Parcourir la source

Remove the explicit cast to QMetaType::Bool and compare with QVariant::Bool instead

Plex-CLA-1.0-signed-off-by: Lukas Pitschl <lukas@leftandleaving.com>
Lukas Pitschl il y a 8 ans
Parent
commit
75c42c4134
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/settings/SettingsComponent.cpp

+ 1 - 1
src/settings/SettingsComponent.cpp

@@ -53,7 +53,7 @@ void SettingsComponent::cycleSetting(const QString& args)
   // Otherwise log an error message, that it's not possible to cycle through the value.
   if (values.size() == 0)
   {
-    if (static_cast<QMetaType::Type>(section->defaultValue(valueName).type()) == QMetaType::Bool)
+    if (section->defaultValue(valueName).type() == QVariant::Bool)
     {
       QVariant currentValue = section->value(valueName);
       auto nextValue = currentValue.toBool() ? false : true;