Unregister window observer before theme manager is deallocated

Technically this probably isn't actually necessary since ThemeManager looks like it should remain allocated until the program quits, but...

Signed-off-by: Kenneth Chew <79120643+kthchew@users.noreply.github.com>
This commit is contained in:
Kenneth Chew
2025-07-16 01:10:05 -04:00
parent 3e65d3a9b5
commit 677a7d7a05
3 changed files with 20 additions and 4 deletions

View File

@@ -50,6 +50,11 @@ ThemeManager::ThemeManager()
initializeCatPacks();
}
ThemeManager::~ThemeManager()
{
stopSettingNewWindowColorsOnMac();
}
/// @brief Adds the Theme to the list of themes
/// @param theme The Theme to add
/// @return Theme ID
@@ -179,6 +184,8 @@ void ThemeManager::setTitlebarColorOnMac(WId windowId, QColor color)
{}
void ThemeManager::setTitlebarColorOfAllWindowsOnMac(QColor color)
{}
void ThemeManager::stopSettingNewWindowColorsOnMac()
{}
#endif
QList<IconTheme*> ThemeManager::getValidIconThemes()