Commit a00b13b5 authored by Méven Car's avatar Méven Car Committed by Méven Car
Browse files

ExportMenu: Port to KIO::ApplicationLauncherJob

parent e7049186
......@@ -23,6 +23,8 @@
#include <KLocalizedString>
#include <KApplicationTrader>
#include <KRun>
#include <KIO/ApplicationLauncherJob>
#include <KNotificationJobUiDelegate>
#include <KStandardShortcut>
#ifdef KIPI_FOUND
#include <KIPI/Plugin>
......@@ -85,8 +87,14 @@ void ExportMenu::getKServiceItems()
connect(action, &QAction::triggered, this, [=]() {
const QUrl filename = mExportManager->getAutosaveFilename();
mExportManager->doSave(filename);
QList<QUrl> whereIs({ filename });
KRun::runService(*service, whereIs, parentWidget(), true);
auto *job = new KIO::ApplicationLauncherJob(service);
auto *delegate = new KNotificationJobUiDelegate;
delegate->setAutoErrorHandlingEnabled(true);
job->setUiDelegate(delegate);
job->setUrls({filename});
job->start();
});
addAction(action);
}
......
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