appstream runner: Don't offer renamed flatpaks to install if they're installed

wilder-5.17
Aleix Pol 7 years ago
parent fad5b4f66f
commit 1ffd599fc4
  1. 3
      runners/appstream/appstreamrunner.cpp

@ -89,8 +89,9 @@ void InstallerRunner::match(Plasma::RunnerContext &context)
continue;
const auto idWithoutDesktop = component.id().remove(".desktop");
const auto serviceQuery = QStringLiteral("exist Exec and (('%1' =~ DesktopEntryName) or '%2' =~ DesktopEntryName)").arg(component.id(), idWithoutDesktop);
const auto serviceQuery = QStringLiteral("exist Exec and ('%1' =~ DesktopEntryName or '%1' in [X-Flatpak-RenamedFrom] or '%2' =~ DesktopEntryName)").arg(component.id(), idWithoutDesktop);
const auto servicesFound = KServiceTypeTrader::self()->query(QStringLiteral("Application"), serviceQuery);
if (!servicesFound.isEmpty())
continue;

Loading…
Cancel
Save