Commit 35495894 authored by David Faure's avatar David Faure

Port KRun::runApplication to ApplicationLauncherJob

Test Plan: Builds

Reviewers: broulik

Reviewed By: broulik

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D29601
parent a42519fd
......@@ -5,7 +5,7 @@ set(PROJECT_VERSION "5.18.80")
set(PROJECT_VERSION_MAJOR 5)
set(QT_MIN_VERSION "5.9.0")
set(KF5_MIN_VERSION "5.42.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})
......
......@@ -33,9 +33,10 @@
#include <KActivities/ResourceInstance>
#include <KConfig>
#include <KConfigGroup>
#include <KIO/ApplicationLauncherJob>
#include <KLocalizedString>
#include <KNotificationJobUiDelegate>
#include <kpluginfactory.h>
#include <KRun>
#include <KService>
#include <KSharedConfig>
#include <KStatusNotifierItem>
......@@ -152,8 +153,10 @@ void BrowserIntegrationReminder::onBrowserStarted(const QString &browser)
return;
}
KRun::runApplication(*service, QList<QUrl>() << m_browsers[browser], nullptr, KRun::RunFlags(),
QString(), nullptr);
KIO::ApplicationLauncherJob *job = new KIO::ApplicationLauncherJob(service);
job->setUrls({m_browsers[browser]});
job->setUiDelegate(new KNotificationJobUiDelegate(KJobUiDelegate::AutoHandlingEnabled));
job->start();
KActivities::ResourceInstance::notifyAccessed(QUrl(QStringLiteral("applications:") + browser),
QStringLiteral("org.kde.plasma.browserintegrationreminder"));
......
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