Changeset View
Changeset View
Standalone View
Standalone View
runners/services/servicerunner.cpp
Show All 18 Lines | |||||
19 | 19 | | |||
20 | #include "servicerunner.h" | 20 | #include "servicerunner.h" | ||
21 | 21 | | |||
22 | #include <QMimeData> | 22 | #include <QMimeData> | ||
23 | 23 | | |||
24 | #include <QIcon> | 24 | #include <QIcon> | ||
25 | #include <QDebug> | 25 | #include <QDebug> | ||
26 | #include <QUrl> | 26 | #include <QUrl> | ||
27 | | ||||
28 | #include <KActivities/ResourceInstance> | ||||
27 | #include <KLocalizedString> | 29 | #include <KLocalizedString> | ||
28 | #include <KRun> | 30 | #include <KRun> | ||
29 | #include <KService> | 31 | #include <KService> | ||
30 | #include <KServiceTypeTrader> | 32 | #include <KServiceTypeTrader> | ||
31 | 33 | | |||
32 | ServiceRunner::ServiceRunner(QObject *parent, const QVariantList &args) | 34 | ServiceRunner::ServiceRunner(QObject *parent, const QVariantList &args) | ||
33 | : Plasma::AbstractRunner(parent, args) | 35 | : Plasma::AbstractRunner(parent, args) | ||
34 | { | 36 | { | ||
▲ Show 20 Lines • Show All 245 Lines • ▼ Show 20 Line(s) | 281 | { | |||
280 | Q_UNUSED(context); | 282 | Q_UNUSED(context); | ||
281 | if (match.type() == Plasma::QueryMatch::HelperMatch) { // Jump List Action | 283 | if (match.type() == Plasma::QueryMatch::HelperMatch) { // Jump List Action | ||
282 | KRun::run(match.data().toString(), {}, nullptr); | 284 | KRun::run(match.data().toString(), {}, nullptr); | ||
283 | return; | 285 | return; | ||
284 | } | 286 | } | ||
285 | 287 | | |||
286 | KService::Ptr service = KService::serviceByStorageId(match.data().toString()); | 288 | KService::Ptr service = KService::serviceByStorageId(match.data().toString()); | ||
287 | if (service) { | 289 | if (service) { | ||
290 | KActivities::ResourceInstance::notifyAccessed( | ||||
291 | QUrl(QStringLiteral("applications:") + service->storageId()), | ||||
292 | QStringLiteral("org.kde.krunner") | ||||
293 | ); | ||||
294 | | ||||
288 | KRun::runService(*service, {}, nullptr); | 295 | KRun::runService(*service, {}, nullptr); | ||
289 | } | 296 | } | ||
290 | } | 297 | } | ||
291 | 298 | | |||
292 | void ServiceRunner::setupMatch(const KService::Ptr &service, Plasma::QueryMatch &match) | 299 | void ServiceRunner::setupMatch(const KService::Ptr &service, Plasma::QueryMatch &match) | ||
293 | { | 300 | { | ||
294 | const QString name = service->name(); | 301 | const QString name = service->name(); | ||
295 | 302 | | |||
Show All 33 Lines |