Преглед изворни кода

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 пре 8 година
родитељ
комит
75c42c4134
1 измењених фајлова са 1 додато и 1 уклоњено
  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;