From 1ffd599fc4e307377f8deee8e472d9fd03957891 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Sat, 29 Jun 2019 13:41:43 +0200 Subject: [PATCH] appstream runner: Don't offer renamed flatpaks to install if they're installed --- runners/appstream/appstreamrunner.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runners/appstream/appstreamrunner.cpp b/runners/appstream/appstreamrunner.cpp index 61ecf0192..eaedd27b7 100644 --- a/runners/appstream/appstreamrunner.cpp +++ b/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;