fix: icon search paths memory leak
Signed-off-by: leia uwu <leia@tutamail.com> (cherry picked from commit 3f67ef968bb9be3b1cdfdfa68e2d38ddf8e1a3cf)
This commit is contained in:
parent
e7e9265c40
commit
9791c306dc
@ -37,6 +37,7 @@
|
|||||||
ThemeManager::ThemeManager()
|
ThemeManager::ThemeManager()
|
||||||
{
|
{
|
||||||
QIcon::setFallbackThemeName(QIcon::themeName());
|
QIcon::setFallbackThemeName(QIcon::themeName());
|
||||||
|
QIcon::setFallbackSearchPaths(QIcon::themeSearchPaths());
|
||||||
themeDebugLog() << "Determining System Widget Theme...";
|
themeDebugLog() << "Determining System Widget Theme...";
|
||||||
const auto& style = QApplication::style();
|
const auto& style = QApplication::style();
|
||||||
m_defaultStyle = style->objectName();
|
m_defaultStyle = style->objectName();
|
||||||
@ -94,9 +95,7 @@ void ThemeManager::initializeIcons()
|
|||||||
// set icon theme search path!
|
// set icon theme search path!
|
||||||
themeDebugLog() << "<> Initializing Icon Themes";
|
themeDebugLog() << "<> Initializing Icon Themes";
|
||||||
|
|
||||||
auto searchPaths = QIcon::themeSearchPaths();
|
QIcon::setThemeSearchPaths({ m_iconThemeFolder.path(), ":/icons" });
|
||||||
searchPaths.append(m_iconThemeFolder.path());
|
|
||||||
QIcon::setThemeSearchPaths(searchPaths);
|
|
||||||
|
|
||||||
for (const QString& id : builtinIcons) {
|
for (const QString& id : builtinIcons) {
|
||||||
IconTheme theme(id, QString(":/icons/%1").arg(id));
|
IconTheme theme(id, QString(":/icons/%1").arg(id));
|
||||||
|
Loading…
Reference in New Issue
Block a user