Commit 37706f4c authored by David Faure's avatar David Faure

Port from KRun::runService to KIO::ApplicationLauncherJob

parent f24048b9
......@@ -4,7 +4,7 @@ set(PROJECT_VERSION "5.18.80")
project(systemsettings VERSION ${PROJECT_VERSION})
set(QT_MIN_VERSION "5.14.0")
set(KF5_MIN_VERSION "5.65.0")
set(KF5_MIN_VERSION "5.70.0")
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
......
......@@ -19,10 +19,9 @@
#include "ExternalAppModule.h"
#include <QApplication>
#include <KCModuleInfo>
#include <KRun>
#include <KIO/ApplicationLauncherJob>
#include <KIO/JobUiDelegate>
ExternalAppModule::ExternalAppModule(QWidget * parent, KCModuleInfo * module)
{
......@@ -51,7 +50,9 @@ void ExternalAppModule::showEvent(QShowEvent * event)
void ExternalAppModule::runExternal()
{
KRun::runService(*(moduleInfo->service()), QList<QUrl>(), qApp->activeWindow()); // Launch it!
KIO::ApplicationLauncherJob *job = new KIO::ApplicationLauncherJob(moduleInfo->service());
job->setUiDelegate(new KIO::JobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, this));
job->start();
}
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