[Services Runner] Fix mimeDataForMatch

Regression introduced in 6e660cf92d since it's now a URL with a scheme, e.g. "applications".
Service actions cannot be dragged out but that wasn't the case before either I believe.

Differential Revision: https://phabricator.kde.org/D28907
wilder-portage-prov
Kai Uwe Broulik 6 years ago
parent 6d25115e46
commit 08bafc3b44
  1. 9
      runners/services/servicerunner.cpp

@ -477,7 +477,14 @@ void ServiceRunner::run(const Plasma::RunnerContext &context, const Plasma::Quer
QMimeData * ServiceRunner::mimeDataForMatch(const Plasma::QueryMatch &match)
{
KService::Ptr service = KService::serviceByStorageId(match.data().toString());
const QUrl dataUrl = match.data().toUrl();
const QString actionName = QUrlQuery(dataUrl).queryItemValue(QStringLiteral("action"));
if (!actionName.isEmpty()) {
return nullptr;
}
KService::Ptr service = KService::serviceByStorageId(dataUrl.path());
if (!service) {
return nullptr;
}

Loading…
Cancel
Save