From 0d079bcf02d59d0f8f75979d866fea5ae0a36de9 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 27 Sep 2022 10:52:57 +0200 Subject: [PATCH] Utils: Remove unused #includes in theme.cpp Change-Id: If9f032414d1b16c15482fc0eb7f804021e561a17 Reviewed-by: Qt CI Bot Reviewed-by: Alessandro Portale --- src/libs/utils/theme/theme.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libs/utils/theme/theme.cpp b/src/libs/utils/theme/theme.cpp index b1ff5a438b5..0d0908c539a 100644 --- a/src/libs/utils/theme/theme.cpp +++ b/src/libs/utils/theme/theme.cpp @@ -3,7 +3,6 @@ #include "theme.h" #include "theme_p.h" -#include "../algorithm.h" #include "../hostosinfo.h" #include "../qtcassert.h" #ifdef Q_OS_MACOS @@ -11,7 +10,6 @@ #endif #include -#include #include #include #include @@ -223,11 +221,13 @@ bool Theme::systemUsesDarkMode() constexpr char regkey[] = "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize"; bool ok; - const auto setting = QSettings(regkey, QSettings::NativeFormat).value("AppsUseLightTheme").toInt(&ok); + const int setting = QSettings(regkey, QSettings::NativeFormat).value("AppsUseLightTheme").toInt(&ok); return ok && setting == 0; - } else if (HostOsInfo::isMacHost()) { - return macOSSystemIsDark(); } + + if (HostOsInfo::isMacHost()) + return macOSSystemIsDark(); + return false; }