[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
wilder-portage-prov
Ahmad Samir 6 years ago
parent 97e843d3ea
commit e3b251fd5b
  1. 5
      applets/icon/iconapplet.cpp

@ -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)

Loading…
Cancel
Save