From 9caba1cb8de99ccf1e19be24942e307c085be5bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 1 Oct 2013 12:28:34 +0200 Subject: [PATCH] [kcmdeco] Fix finding of all Aurorae themes --- kcmkwin/kwindecoration/decorationmodel.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/kcmkwin/kwindecoration/decorationmodel.cpp b/kcmkwin/kwindecoration/decorationmodel.cpp index 9a2070d9b4..55f76b05be 100644 --- a/kcmkwin/kwindecoration/decorationmodel.cpp +++ b/kcmkwin/kwindecoration/decorationmodel.cpp @@ -158,8 +158,15 @@ void DecorationModel::findAuroraeThemes() { // get all destop themes QStringList themes; - const QStringList dirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "aurorae/themes", QStandardPaths::LocateDirectory); + const QStringList dirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "aurorae/themes/", QStandardPaths::LocateDirectory); + QStringList themeDirectories; Q_FOREACH (const QString & dir, dirs) { + QDir directory = QDir(dir); + for (const QString &themeDir : directory.entryList(QDir::AllDirs | QDir::NoDotAndDotDot)) { + themeDirectories << dir + themeDir; + } + } + for (const QString &dir : themeDirectories) { for (const QString & file : QDir(dir).entryList(QStringList() << QStringLiteral("metadata.desktop"))) { themes.append(dir + '/' + file); }