Verified Commit 33f2d322 authored by Fushan Wen's avatar Fushan Wen
Browse files

krunner: Open kcm_krunnersettings instead of kcm_plasmasearch

kcm_plasmasearch now only has plugin settings. KRunner-specific settings
are moved to kcm_krunnersettings.

CCBUG: 318538
parent 0de1ccf5
......@@ -20,6 +20,7 @@ target_link_libraries(krunner
KF5::I18n
KF5::PlasmaQuick
KF5::DBusAddons
KF5::KCMUtils
KF5::Crash
KF5::WaylandClient
KF5::QuickAddons
......
......@@ -17,6 +17,7 @@
#include <QScreen>
#include <KAuthorized>
#include <KCMultiDialog>
#include <KCrash>
#include <KIO/CommandLauncherJob>
#include <KLocalizedString>
......@@ -327,18 +328,18 @@ void View::switchUser()
void View::displayConfiguration()
{
const QString systemSettings = QStringLiteral("systemsettings");
const QStringList kcmToOpen = QStringList(QStringLiteral("kcm_plasmasearch"));
KIO::CommandLauncherJob *job = nullptr;
const KPluginMetaData krunnerModule(QPluginLoader("plasma/kcms/desktop/kcm_krunnersettings"));
KCMultiDialog *settingsDialog;
if (KService::serviceByDesktopName(systemSettings)) {
job = new KIO::CommandLauncherJob(QStringLiteral("systemsettings5"), kcmToOpen);
job->setDesktopName(systemSettings);
if (krunnerModule.isValid()) {
settingsDialog = new KCMultiDialog();
settingsDialog->addModule(krunnerModule);
} else {
job = new KIO::CommandLauncherJob(QStringLiteral("kcmshell5"), kcmToOpen);
return;
}
job->start();
connect(settingsDialog, &QDialog::finished, settingsDialog, &QObject::deleteLater);
settingsDialog->show();
}
bool View::canConfigure() const
......
......@@ -71,7 +71,7 @@ ColumnLayout {
runnerWindow.displayConfiguration()
}
Accessible.name: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Configure")
Accessible.description: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Configure Search Plugins")
Accessible.description: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Configure KRunner Behavior")
visible: runnerWindow.canConfigure
PlasmaComponents3.ToolTip {
text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Configure KRunner…")
......
Supports Markdown
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