diff --git a/src/gui/uithememanager.cpp b/src/gui/uithememanager.cpp index 15cf93fe4..3343cfaa5 100644 --- a/src/gui/uithememanager.cpp +++ b/src/gui/uithememanager.cpp @@ -76,6 +76,9 @@ void UIThemeManager::initInstance() UIThemeManager::UIThemeManager() : m_useCustomTheme(Preferences::instance()->useCustomUITheme()) +#if (defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)) + , m_useSystemTheme(Preferences::instance()->useSystemIconTheme()) +#endif { const Preferences *const pref = Preferences::instance(); if (m_useCustomTheme) { @@ -87,10 +90,6 @@ UIThemeManager::UIThemeManager() applyPalette(); } } - -#if (defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)) - m_useSystemTheme = pref->useSystemIconTheme(); -#endif } UIThemeManager *UIThemeManager::instance() diff --git a/src/gui/uithememanager.h b/src/gui/uithememanager.h index 3eb3b0a21..dca86193b 100644 --- a/src/gui/uithememanager.h +++ b/src/gui/uithememanager.h @@ -64,6 +64,6 @@ private: mutable QHash m_iconCache; const bool m_useCustomTheme; #if (defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)) - bool m_useSystemTheme; + const bool m_useSystemTheme; #endif };