From e3b251fd5b06b47259d072928163a878071cd096 Mon Sep 17 00:00:00 2001 From: Ahmad Samir Date: Tue, 12 May 2020 06:13:22 +0200 Subject: [PATCH] [IconApplet] Port KRun to ApplicationLauncherJob Test Plan: Open the Application Launcher, right click any app -> Add to Panel (Widget), then click the icon on the panel, it should launch. Reviewers: #plasma, broulik, dfaure Reviewed By: dfaure Subscribers: dfaure, ngraham, plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D29687 --- applets/icon/iconapplet.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/applets/icon/iconapplet.cpp b/applets/icon/iconapplet.cpp index 78e0fa80a..1ca6f30ce 100644 --- a/applets/icon/iconapplet.cpp +++ b/applets/icon/iconapplet.cpp @@ -43,7 +43,6 @@ #include #include #include -#include #include #include @@ -432,7 +431,9 @@ void IconApplet::run() connect(m_startupTasksModel, &QAbstractItemModel::rowsAboutToBeRemoved, this, std::bind(handleRow, false /*busy*/, _1, _2, _3)); } - new KRun(QUrl::fromLocalFile(m_localPath), QApplication::desktop()); + KIO::ApplicationLauncherJob *job = new KIO::ApplicationLauncherJob(KService::Ptr(new KService(m_localPath))); + job->setUiDelegate(new KNotificationJobUiDelegate(KJobUiDelegate::AutoHandlingEnabled)); + job->start(); } void IconApplet::processDrop(QObject *dropEvent)