Commit 9f058255 authored by Nate Graham's avatar Nate Graham
Browse files

Make KRunner KCM open in System Settings

BUG: 421427
FIXED-IN: 5.19.1
parent dd247394
...@@ -28,7 +28,7 @@ include(KDEClangFormat) ...@@ -28,7 +28,7 @@ include(KDEClangFormat)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
Plasma DocTools Runner Notifications NotifyConfig Su NewStuff Wallet Plasma DocTools Runner Notifications NotifyConfig Su NewStuff Wallet
IdleTime Declarative I18n KCMUtils TextWidgets KDELibs4Support Crash GlobalAccel IdleTime Declarative I18n KCMUtils TextWidgets KDELibs4Support Crash GlobalAccel
DBusAddons Wayland CoreAddons People ActivitiesStats) DBusAddons Wayland CoreAddons People ActivitiesStats KIO)
find_package(KDED CONFIG REQUIRED) find_package(KDED CONFIG REQUIRED)
find_package(KF5NetworkManagerQt ${KF5_MIN_VERSION}) find_package(KF5NetworkManagerQt ${KF5_MIN_VERSION})
......
...@@ -16,6 +16,7 @@ add_executable(krunner ${krunner_SRCS}) ...@@ -16,6 +16,7 @@ add_executable(krunner ${krunner_SRCS})
target_link_libraries(krunner target_link_libraries(krunner
Qt5::Quick Qt5::Quick
Qt5::Widgets Qt5::Widgets
KF5::KIOWidgets
KF5::Declarative KF5::Declarative
KF5::I18n KF5::I18n
KF5::PlasmaQuick KF5::PlasmaQuick
......
...@@ -33,6 +33,8 @@ ...@@ -33,6 +33,8 @@
#include <KWindowEffects> #include <KWindowEffects>
#include <KLocalizedString> #include <KLocalizedString>
#include <KCrash> #include <KCrash>
#include <KService>
#include <KIO/CommandLauncherJob>
#include <kdeclarative/qmlobject.h> #include <kdeclarative/qmlobject.h>
...@@ -332,7 +334,18 @@ void View::switchUser() ...@@ -332,7 +334,18 @@ void View::switchUser()
void View::displayConfiguration() void View::displayConfiguration()
{ {
QProcess::startDetached(QStringLiteral("kcmshell5"), QStringList() << QStringLiteral("plasmasearch")); const QString systemSettings = QStringLiteral("systemsettings");
const QStringList kcmToOpen = QStringList(QStringLiteral("kcm_plasmasearch"));
KIO::CommandLauncherJob *job = nullptr;
if (KService::serviceByDesktopName(systemSettings)) {
job = new KIO::CommandLauncherJob(QStringLiteral("systemsettings5"), kcmToOpen);
job->setDesktopName(systemSettings);
} else {
job = new KIO::CommandLauncherJob(QStringLiteral("kcmshell5"), kcmToOpen);
}
job->start();
} }
bool View::canConfigure() const bool View::canConfigure() const
......
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