Commit 9e545131 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

[Kicker] Fix jump list actions in RunnerMatchesModel

Fixes regression caused by me meddling with data in 6e660cf9
Unfortunately KRunner has no notion of "this is application xyz" so Kicker has to make assumptions, which broke here.

Differential Revision: https://phabricator.kde.org/D29744
parent ead848c6
...@@ -109,8 +109,18 @@ QVariant RunnerMatchesModel::data(const QModelIndex &index, int role) const ...@@ -109,8 +109,18 @@ QVariant RunnerMatchesModel::data(const QModelIndex &index, int role) const
return actionList; return actionList;
} }
const KService::Ptr service = KService::serviceByStorageId(match.data().toString()); const QUrl dataUrl(match.data().toUrl());
if (dataUrl.scheme() != QLatin1String("applications")) {
return actionList;
}
// Don't offer jump list actions on a jump list action.
const QString actionName = QUrlQuery(dataUrl).queryItemValue(QStringLiteral("action"));
if (!actionName.isEmpty()) {
return actionList;
}
const KService::Ptr service = KService::serviceByStorageId(dataUrl.path());
if (service) { if (service) {
if (!actionList.isEmpty()) { if (!actionList.isEmpty()) {
actionList << Kicker::createSeparatorActionItem(); actionList << Kicker::createSeparatorActionItem();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment