Commit 6e196a65 authored by David Faure's avatar David Faure

Port quicklaunch from KRun::run to CommandLauncherJob

Test Plan: Builds, but untested.

Reviewers: drosca, davidedmundson, broulik

Reviewed By: broulik

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D28990
parent a7b385b6
......@@ -10,7 +10,7 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
endif()
set(QT_MIN_VERSION 5.12.0)
set(KF5_MIN_VERSION 5.58.0)
set(KF5_MIN_VERSION 5.70.0)
include(FeatureSummary)
......
......@@ -7,7 +7,8 @@ target_link_libraries(quicklaunchplugin
Qt5::Core
Qt5::Qml
KF5::KIOCore
KF5::KIOWidgets)
KF5::KIOWidgets
KF5::Notifications)
install(TARGETS quicklaunchplugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/private/quicklaunch)
install(FILES qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/private/quicklaunch)
......@@ -33,8 +33,10 @@
#include <KRun>
#include <KConfig>
#include <KConfigGroup>
#include <KNotificationJobUiDelegate>
#include <KFileItem>
#include <KDesktopFile>
#include <KIO/CommandLauncherJob>
#include <KOpenWithDialog>
#include <KPropertiesDialog>
......@@ -121,7 +123,9 @@ void QuicklaunchPrivate::openUrl(const QUrl &url)
void QuicklaunchPrivate::openExec(const QString &exec)
{
KRun::run(exec, {}, nullptr);
KIO::CommandLauncherJob *job = new KIO::CommandLauncherJob(exec);
job->setUiDelegate(new KNotificationJobUiDelegate(KJobUiDelegate::AutoHandlingEnabled));
job->start();
}
void QuicklaunchPrivate::addLauncher(bool isPopup)
......
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