Filter more useless desktop files

We now also exclude the apps which are not suitable for the current
platform (some apps may be X11 only), and the ones that run in a
terminal, such as vim and ipython -- they're just not useful to show on
the homescreen.

Reviewed-by:notmart
This commit is contained in:
Sebastian Kügler 2015-06-15 21:28:28 -07:00
parent fdb34e9a74
commit 75664c118a

View file

@ -109,7 +109,10 @@ void ApplicationListModel::loadApplications()
if (entry->property("Exec").isValid()) {
KService::Ptr service(static_cast<KService* >(entry.data()));
if (service->isApplication() &&
!blacklist.contains(service->desktopEntryName() + QStringLiteral(".desktop")) ) {
!blacklist.contains(service->desktopEntryName() + QStringLiteral(".desktop")) &&
!service->showOnCurrentPlatform() &&
!service->property("Terminal", QVariant::Bool).toBool()) {
data.name = service->name();
data.icon = service->icon();
data.storageId = service->storageId();