Changeset View
Changeset View
Standalone View
Standalone View
runners/services/servicerunner.cpp
Show First 20 Lines • Show All 471 Lines • ▼ Show 20 Line(s) | 442 | { | |||
---|---|---|---|---|---|
472 | auto *delegate = new KNotificationJobUiDelegate; | 472 | auto *delegate = new KNotificationJobUiDelegate; | ||
473 | delegate->setAutoErrorHandlingEnabled(true); | 473 | delegate->setAutoErrorHandlingEnabled(true); | ||
474 | job->setUiDelegate(delegate); | 474 | job->setUiDelegate(delegate); | ||
475 | job->start(); | 475 | job->start(); | ||
476 | } | 476 | } | ||
477 | 477 | | |||
478 | QMimeData * ServiceRunner::mimeDataForMatch(const Plasma::QueryMatch &match) | 478 | QMimeData * ServiceRunner::mimeDataForMatch(const Plasma::QueryMatch &match) | ||
479 | { | 479 | { | ||
480 | KService::Ptr service = KService::serviceByStorageId(match.data().toString()); | 480 | const QUrl dataUrl = match.data().toUrl(); | ||
481 | | ||||
482 | const QString actionName = QUrlQuery(dataUrl).queryItemValue(QStringLiteral("action")); | ||||
483 | if (!actionName.isEmpty()) { | ||||
484 | return nullptr; | ||||
485 | } | ||||
486 | | ||||
487 | KService::Ptr service = KService::serviceByStorageId(dataUrl.path()); | ||||
481 | if (!service) { | 488 | if (!service) { | ||
482 | return nullptr; | 489 | return nullptr; | ||
483 | } | 490 | } | ||
484 | 491 | | |||
485 | QString path = service->entryPath(); | 492 | QString path = service->entryPath(); | ||
486 | if (!QDir::isAbsolutePath(path)) { | 493 | if (!QDir::isAbsolutePath(path)) { | ||
487 | path = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("kservices5/") + path); | 494 | path = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("kservices5/") + path); | ||
488 | } | 495 | } | ||
Show All 9 Lines |