forked from qt-creator/qt-creator
Utils: Remove unused #includes in theme.cpp
Change-Id: If9f032414d1b16c15482fc0eb7f804021e561a17 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
#include "theme.h"
|
#include "theme.h"
|
||||||
#include "theme_p.h"
|
#include "theme_p.h"
|
||||||
#include "../algorithm.h"
|
|
||||||
#include "../hostosinfo.h"
|
#include "../hostosinfo.h"
|
||||||
#include "../qtcassert.h"
|
#include "../qtcassert.h"
|
||||||
#ifdef Q_OS_MACOS
|
#ifdef Q_OS_MACOS
|
||||||
@@ -11,7 +10,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QFileInfo>
|
|
||||||
#include <QMetaEnum>
|
#include <QMetaEnum>
|
||||||
#include <QPalette>
|
#include <QPalette>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
@@ -223,11 +221,13 @@ bool Theme::systemUsesDarkMode()
|
|||||||
constexpr char regkey[]
|
constexpr char regkey[]
|
||||||
= "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize";
|
= "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize";
|
||||||
bool ok;
|
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;
|
return ok && setting == 0;
|
||||||
} else if (HostOsInfo::isMacHost()) {
|
|
||||||
return macOSSystemIsDark();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (HostOsInfo::isMacHost())
|
||||||
|
return macOSSystemIsDark();
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user