Changeset View
Changeset View
Standalone View
Standalone View
runners/services/servicerunner.cpp
Show First 20 Lines • Show All 452 Lines • ▼ Show 20 Line(s) | 452 | KActivities::ResourceInstance::notifyAccessed( | |||
---|---|---|---|---|---|
453 | QUrl(QStringLiteral("applications:") + service->storageId()), | 453 | QUrl(QStringLiteral("applications:") + service->storageId()), | ||
454 | QStringLiteral("org.kde.krunner") | 454 | QStringLiteral("org.kde.krunner") | ||
455 | ); | 455 | ); | ||
456 | 456 | | |||
457 | KIO::ApplicationLauncherJob *job = nullptr; | 457 | KIO::ApplicationLauncherJob *job = nullptr; | ||
458 | 458 | | |||
459 | const QString actionName = QUrlQuery(dataUrl).queryItemValue(QStringLiteral("action")); | 459 | const QString actionName = QUrlQuery(dataUrl).queryItemValue(QStringLiteral("action")); | ||
460 | if (actionName.isEmpty()) { | 460 | if (actionName.isEmpty()) { | ||
461 | // We want to load kcms directly with systemsettings, | ||||
broulik: A comment here would be nice | |||||
462 | // but we can't completely replace kcmshell with systemsettings | ||||
463 | // as we need to be able to load kcms without plasma and we can't | ||||
464 | // implement all kcmshell features into systemsettings | ||||
465 | if (service->serviceTypes().contains(QLatin1String("KCModule"))) { | ||||
466 | if (service->parentApp() == QStringLiteral("kinfocenter")) { | ||||
467 | service->setExec(QStringLiteral("kinfocenter ") + service->desktopEntryName()); | ||||
468 | } else { | ||||
469 | service->setExec(QStringLiteral("systemsettings5 ") + service->desktopEntryName()); | ||||
470 | } | ||||
471 | } | ||||
461 | job = new KIO::ApplicationLauncherJob(service); | 472 | job = new KIO::ApplicationLauncherJob(service); | ||
462 | } else { | 473 | } else { | ||
463 | const auto actions = service->actions(); | 474 | const auto actions = service->actions(); | ||
464 | auto it = std::find_if(actions.begin(), actions.end(), [&actionName](const KServiceAction &action) { | 475 | auto it = std::find_if(actions.begin(), actions.end(), [&actionName](const KServiceAction &action) { | ||
465 | return action.name() == actionName; | 476 | return action.name() == actionName; | ||
466 | }); | 477 | }); | ||
467 | Q_ASSERT(it != actions.end()); | 478 | Q_ASSERT(it != actions.end()); | ||
468 | 479 | | |||
Show All 29 Lines |
A comment here would be nice