From 99a1802dbb473a1dd7207da40edda608504165a8 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Sat, 23 May 2020 21:11:19 +0800 Subject: [PATCH] Make class variable const --- src/gui/uithememanager.cpp | 7 +++---- src/gui/uithememanager.h | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) 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 };