diff options
author | TheKodeToad <TheKodeToad@proton.me> | 2023-07-21 17:58:48 +0100 |
---|---|---|
committer | TheKodeToad <TheKodeToad@proton.me> | 2023-07-22 11:05:58 +0100 |
commit | 516ddb22ae2c05e35401b0a5a6d81d93fc3d5ea1 (patch) | |
tree | 041778ea1253ba42a3da2fd698671bd5476c75d9 /launcher/ui/themes | |
parent | 1a7c5693cc9d21cf974ad56e55a3ca07a22c8477 (diff) | |
download | PrismLauncher-516ddb22ae2c05e35401b0a5a6d81d93fc3d5ea1.tar.gz PrismLauncher-516ddb22ae2c05e35401b0a5a6d81d93fc3d5ea1.tar.bz2 PrismLauncher-516ddb22ae2c05e35401b0a5a6d81d93fc3d5ea1.zip |
More catpack changes :3
This is just embarrasing
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Diffstat (limited to 'launcher/ui/themes')
-rw-r--r-- | launcher/ui/themes/ThemeManager.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/launcher/ui/themes/ThemeManager.cpp b/launcher/ui/themes/ThemeManager.cpp index fc7c3649..46fe0b25 100644 --- a/launcher/ui/themes/ThemeManager.cpp +++ b/launcher/ui/themes/ThemeManager.cpp @@ -62,7 +62,10 @@ ITheme* ThemeManager::getTheme(QString themeId) QString ThemeManager::addIconTheme(IconTheme theme) { QString id = theme.id(); - m_icons.emplace(id, std::move(theme)); + if (m_icons.find(id) == m_icons.end()) + m_icons.emplace(id, std::move(theme)); + else + themeWarningLog() << "IconTheme(" << id << ") not added to prevent id duplication"; return id; } @@ -129,7 +132,7 @@ void ThemeManager::initializeWidgets() themeWarningLog() << "Couldn't create theme folder"; themeDebugLog() << "Theme Folder Path: " << m_applicationThemeFolder.absolutePath(); - QDirIterator directoryIterator(m_applicationThemeFolder.path(), QDir::Dirs | QDir::NoDotAndDotDot, QDirIterator::Subdirectories); + QDirIterator directoryIterator(m_applicationThemeFolder.path(), QDir::Dirs | QDir::NoDotAndDotDot); while (directoryIterator.hasNext()) { QDir dir(directoryIterator.next()); QFileInfo themeJson(dir.absoluteFilePath("theme.json")); |