From 33dc0707580ea815e39fafe2d14ae80b16e23ecc Mon Sep 17 00:00:00 2001 From: Ahmad Samir Date: Tue, 18 Aug 2020 15:13:39 +0200 Subject: [PATCH] Port KRun to ApplicationLauncherJob --- ktnef/src/ktnefmain.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ktnef/src/ktnefmain.cpp b/ktnef/src/ktnefmain.cpp index 0b4237c85..7ccde6723 100644 --- a/ktnef/src/ktnefmain.cpp +++ b/ktnef/src/ktnefmain.cpp @@ -43,7 +43,6 @@ #include #include -#include #include #include @@ -283,7 +282,11 @@ void KTNEFMain::viewFileAs() list.append(QUrl::fromLocalFile(extractTemp(mView->getSelection().at(0)))); if (!list.isEmpty()) { - KRun::displayOpenWithDialog(list, this); + // Creating ApplicationLauncherJob without any args will invoke the open-with dialog + KIO::ApplicationLauncherJob *job = new KIO::ApplicationLauncherJob(); + job->setUrls(list); + job->setUiDelegate(new KIO::JobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, this)); + job->start(); } } else { KMessageBox::information(