Commit f7ec0b28 authored by Ralf Habacker's avatar Ralf Habacker
Browse files

Fix 'Layoutgenerator does not work with KF5 builds'.

The former port to Qt5 did not cover the wildcard filter usage.

FIXED-IN:2.21.1 (KDE Applications 16.12.1)
parent bc78584c
......@@ -294,7 +294,14 @@ bool LayoutGenerator::availableConfigFiles(UMLScene *scene, QHash<QString,QStrin
QString diagramType = Uml::DiagramType::toString(scene->type()).toLower();
#if QT_VERSION >= 0x050000
QStringList fileNames = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QString::fromLatin1("umbrello/layouts/%1*.desktop").arg(diagramType));
const QStringList dirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QLatin1String("umbrello/layouts"), QStandardPaths::LocateDirectory);
QStringList fileNames;
foreach(const QString& dir, dirs) {
const QStringList entries = QDir(dir).entryList(QStringList() << QString::fromLatin1("%1*.desktop").arg(diagramType));
foreach(const QString& file, entries) {
fileNames.append(dir + QLatin1Char('/') + file);
KStandardDirs dirs;
QStringList fileNames = dirs.findAllResources("data", QString::fromLatin1("umbrello/layouts/%1*.desktop").arg(diagramType));
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment