Commit e3b251fd authored by Ahmad Samir's avatar Ahmad Samir
Browse files

[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
parent 97e843d3
......@@ -43,7 +43,6 @@
#include <KLocalizedString>
#include <KNotificationJobUiDelegate>
#include <KProtocolManager>
#include <KRun>
#include <KService>
#include <KServiceAction>
......@@ -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)
......
Markdown is supported
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