aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--launcher/ui/themes/ThemeManager.cpp7
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"));