Commit d197736a authored by Sebastian Kügler's avatar Sebastian Kügler

Add list with all apps to config for debugging purposes

parent 0e5ce58b
......@@ -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<KService* >(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;
......
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