From d197736adc81a60dbf4eb253658108dcf64c5a9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20K=C3=BCgler?= Date: Fri, 19 Jun 2015 21:28:00 -0700 Subject: [PATCH] Add list with all apps to config for debugging purposes --- containments/homescreen/applicationlistmodel.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/containments/homescreen/applicationlistmodel.cpp b/containments/homescreen/applicationlistmodel.cpp index f47b6abf..0063359e 100644 --- a/containments/homescreen/applicationlistmodel.cpp +++ b/containments/homescreen/applicationlistmodel.cpp @@ -80,6 +80,12 @@ void ApplicationListModel::loadApplications() { auto cfg = KSharedConfig::openConfig("applications-blacklistrc"); auto blgroup = KConfigGroup(cfg, QStringLiteral("Applications")); + + // This is only temporary to get a clue what those apps' desktop files are called + // I'll remove it once I've done a blacklist + QStringList bl; + + QStringList blacklist = blgroup.readEntry("blacklist", QStringList()); beginResetModel(); @@ -109,11 +115,16 @@ void ApplicationListModel::loadApplications() if (entry->property("Exec").isValid()) { KService::Ptr service(static_cast(entry.data())); + + qDebug() << " desktopEntryName: " << service->desktopEntryName(); + if (service->isApplication() && !blacklist.contains(service->desktopEntryName() + QStringLiteral(".desktop")) && service->showOnCurrentPlatform() && !service->property("Terminal", QVariant::Bool).toBool()) { + bl << service->desktopEntryName(); + data.name = service->name(); data.icon = service->icon(); data.storageId = service->storageId(); @@ -131,6 +142,9 @@ void ApplicationListModel::loadApplications() } } + blgroup.writeEntry("allapps", bl); + cfg.sync(); + std::sort(unorderedList.begin(), unorderedList.end(), appNameLessThan); m_applicationList << orderedList.values(); m_applicationList << unorderedList;