mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-14 02:27:09 -07:00
Make class variable const
This commit is contained in:
parent
00eb61543d
commit
99a1802dbb
2 changed files with 4 additions and 5 deletions
|
@ -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()
|
||||||
|
|
|
@ -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…
Add table
Add a link
Reference in a new issue