diff --git a/runners/services/servicerunner.cpp b/runners/services/servicerunner.cpp --- a/runners/services/servicerunner.cpp +++ b/runners/services/servicerunner.cpp @@ -22,8 +22,10 @@ #include -#include #include +#include +#include +#include #include #include @@ -467,16 +469,22 @@ QMimeData * ServiceRunner::mimeDataForMatch(const Plasma::QueryMatch &match) { KService::Ptr service = KService::serviceByStorageId(match.data().toString()); - if (service) { - QMimeData * result = new QMimeData(); - QList urls; - urls << QUrl::fromLocalFile(service->entryPath()); - qCDebug(RUNNER_SERVICES) << urls; - result->setUrls(urls); - return result; + if (!service) { + return nullptr; + } + + QString path = service->entryPath(); + if (!QDir::isAbsolutePath(path)) { + path = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("kservices5/") + path); + } + + if (path.isEmpty()) { + return nullptr; } - return 0; + QMimeData *data = new QMimeData(); + data->setUrls(QList{QUrl::fromLocalFile(path)}); + return data; } K_EXPORT_PLASMA_RUNNER(services, ServiceRunner)