Commit e67e8d6d authored by Marco Martin's avatar Marco Martin
Browse files

force systemsettings for kcms

as we can't kill completely kcmshell just yet, hack intothe services runner to
replace on the fly the exec line of the service to systemsettings

BUG: 402790
FIXED-IN: 5.19.0

Test Plan:
search and launch directly for a module, systemsettings is launched wit hthe
proper module loaded

Reviewers: #plasma, ngraham

Reviewed By: ngraham

Subscribers: broulik, ngraham, davidre, plasma-devel

Tags: #plasma

Differential Revision:
parent dbc7bd3c
......@@ -294,7 +294,11 @@ private:
qCDebug(RUNNER_SERVICES) << service->name() << "is this relevant:" << relevance;
if (service->serviceTypes().contains(QLatin1String("KCModule"))) {
match.setMatchCategory(i18n("System Settings"));
if (service->parentApp() == QStringLiteral("kinfocenter")) {
match.setMatchCategory(i18n("System Information"));
} else {
match.setMatchCategory(i18n("System Settings"));
matches << match;
......@@ -458,6 +462,17 @@ void ServiceRunner::run(const Plasma::RunnerContext &context, const Plasma::Quer
const QString actionName = QUrlQuery(dataUrl).queryItemValue(QStringLiteral("action"));
if (actionName.isEmpty()) {
// We want to load kcms directly with systemsettings,
// but we can't completely replace kcmshell with systemsettings
// as we need to be able to load kcms without plasma and we can't
// implement all kcmshell features into systemsettings
if (service->serviceTypes().contains(QLatin1String("KCModule"))) {
if (service->parentApp() == QStringLiteral("kinfocenter")) {
service->setExec(QStringLiteral("kinfocenter ") + service->desktopEntryName());
} else {
service->setExec(QStringLiteral("systemsettings5 ") + service->desktopEntryName());
job = new KIO::ApplicationLauncherJob(service);
} else {
const auto actions = service->actions();
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