Commit 266239be authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Simplify listing code

parent f9c820d6
......@@ -549,14 +549,12 @@ bool FlatpakBackend::loadInstalledApps(FlatpakInstallation *flatpakInstallation)
const QDir dir(pathApps);
if (dir.exists()) {
foreach (const QString &file, dir.entryList(QDir::NoDotAndDotDot | QDir::Files)) {
QString fnDesktop;
if (file == QLatin1String("mimeinfo.cache")) {
foreach (const auto &file, dir.entryInfoList( QDir::Files)) {
if (file.fileName() == QLatin1String("mimeinfo.cache")) {
fnDesktop = pathApps + file;
const QString fnDesktop = file.absolutePath();
AppStream::Metadata metadata;
AppStream::Metadata::MetadataError error = metadata.parseFile(fnDesktop, AppStream::Metadata::FormatKindDesktopEntry);
Markdown is supported
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