D29687: [IconApplet] Port KRun to ApplicationLauncherJob

Kai Uwe Broulik noreply at phabricator.kde.org
Wed May 13 08:03:12 BST 2020


broulik requested changes to this revision.
broulik added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> iconapplet.cpp:435
>  
> -    new KRun(QUrl::fromLocalFile(m_localPath), QApplication::desktop());
> +    KIO::ApplicationLauncherJob *job = new KIO::ApplicationLauncherJob(KService::serviceByStorageId(m_localPath));
> +    job->setUiDelegate(new KIO::JobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, QApplication::desktop()));

`m_localPath` is a *path* so you want `serviceByDesktopPath`

> iconapplet.cpp:436
> +    KIO::ApplicationLauncherJob *job = new KIO::ApplicationLauncherJob(KService::serviceByStorageId(m_localPath));
> +    job->setUiDelegate(new KIO::JobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, QApplication::desktop()));
> +    job->start();

Use `KNotificationJobUiDelegate`

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D29687

To: ahmadsamir, #plasma, broulik
Cc: ngraham, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20200513/08570ba1/attachment.htm>


More information about the Plasma-devel mailing list