Commit 15021b43 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

[containmentactions/applauncher] Use ApplicationLauncherJob instead of


We are starting a KService, but with extra steps. Use the appropriate

This fixes launching apps since OpenUrlJob, by default, doesn't launch

BUG: 449900
parent c76f1443
Pipeline #136170 passed with stage
in 8 minutes and 54 seconds
......@@ -8,7 +8,7 @@
#include <QDebug>
#include <KIO/OpenUrlJob>
#include <KIO/ApplicationLauncherJob>
#include <Plasma/PluginLoader>
AppLauncher::AppLauncher(QObject *parent, const QVariantList &args)
......@@ -49,7 +49,7 @@ void AppLauncher::makeMenu(QMenu *menu, const KServiceGroup::Ptr group)
QAction *action = new QAction(QIcon::fromTheme(service->icon()), text, this);
connect(action, &QAction::triggered, [action]() {
KService::Ptr service = KService::serviceByStorageId(action->data().toString());
auto job = new KIO::OpenUrlJob(QUrl("file://" + service->entryPath()));
auto job = new KIO::ApplicationLauncherJob(service);
Supports Markdown
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