applets/kicker: use better API to determine apps' AppStream IDs

The current code gathers AppStream IDs by looking at the app's desktop
name and then adding ".desktop" onto the end of this, reflecting a
now-deprecated convention that every AppStream ID ought to end in
".desktop". This hasn't been true for a while and isn't correct today;
let's use a more modern API that returns more correct results.

BUG: 458812
FIXED-IN: 5.24.7
wilder-5.26
Nate Graham 4 years ago
parent 6ce2204b70
commit 8cd5190fac
  1. 3
      applets/kicker/plugin/actionlist.cpp

@ -430,7 +430,8 @@ QVariantList appstreamActions(const KService::Ptr &service)
appstreamPool->load();
}
const auto components = appstreamPool->componentsById(service->desktopEntryName() + QLatin1String(".desktop"));
const auto components =
appstreamPool->componentsByLaunchable(AppStream::Launchable::KindDesktopId, service->desktopEntryName() + QLatin1String(".desktop"));
for (const auto &component : components) {
const QString componentId = component.id();

Loading…
Cancel
Save