소스 검색

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;