Browse Source

Make class variable const

adaptive-webui-19844
Chocobo1 4 years ago
parent
commit
99a1802dbb
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 7
      src/gui/uithememanager.cpp
  2. 2
      src/gui/uithememanager.h

7
src/gui/uithememanager.cpp

@ -76,6 +76,9 @@ void UIThemeManager::initInstance()
UIThemeManager::UIThemeManager() UIThemeManager::UIThemeManager()
: m_useCustomTheme(Preferences::instance()->useCustomUITheme()) : 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(); const Preferences *const pref = Preferences::instance();
if (m_useCustomTheme) { if (m_useCustomTheme) {
@ -87,10 +90,6 @@ UIThemeManager::UIThemeManager()
applyPalette(); applyPalette();
} }
} }
#if (defined(Q_OS_UNIX) && !defined(Q_OS_MACOS))
m_useSystemTheme = pref->useSystemIconTheme();
#endif
} }
UIThemeManager *UIThemeManager::instance() UIThemeManager *UIThemeManager::instance()

2
src/gui/uithememanager.h

@ -64,6 +64,6 @@ private:
mutable QHash<QString, QIcon> m_iconCache; mutable QHash<QString, QIcon> m_iconCache;
const bool m_useCustomTheme; const bool m_useCustomTheme;
#if (defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)) #if (defined(Q_OS_UNIX) && !defined(Q_OS_MACOS))
bool m_useSystemTheme; const bool m_useSystemTheme;
#endif #endif
}; };

Loading…
Cancel
Save