Changeset View
Changeset View
Standalone View
Standalone View
applets/kicker/plugin/runnermatchesmodel.cpp
Show First 20 Lines • Show All 89 Lines • ▼ Show 20 Line(s) | 81 | } else if (role == Kicker::HasActionListRole) { | |||
---|---|---|---|---|---|
90 | 90 | | |||
91 | Q_ASSERT(runner); | 91 | Q_ASSERT(runner); | ||
92 | 92 | | |||
93 | return match.runner()->id() == QLatin1String("services") || !runner->actions().isEmpty(); | 93 | return match.runner()->id() == QLatin1String("services") || !runner->actions().isEmpty(); | ||
94 | } else if (role == Kicker::ActionListRole) { | 94 | } else if (role == Kicker::ActionListRole) { | ||
95 | QVariantList actionList; | 95 | QVariantList actionList; | ||
96 | 96 | | |||
97 | foreach (QAction *action, m_runnerManager->actionsForMatch(match)) { | 97 | foreach (QAction *action, m_runnerManager->actionsForMatch(match)) { | ||
98 | QVariantMap item = Kicker::createActionItem(action->text(), QStringLiteral("runnerAction"), | 98 | QVariantMap item = Kicker::createActionItem(action->text(), action->icon().name(), QStringLiteral("runnerAction"), | ||
99 | QVariant::fromValue<QObject *>(action)); | 99 | QVariant::fromValue<QObject *>(action)); | ||
100 | item[QStringLiteral("icon")] = action->icon(); | | |||
101 | 100 | | |||
102 | actionList << item; | 101 | actionList << item; | ||
103 | } | 102 | } | ||
104 | 103 | | |||
105 | // Only try to get a KService for matches from the services runner. Assuming | 104 | // Only try to get a KService for matches from the services runner. Assuming | ||
106 | // that any other runner returns something we want to turn into a KService is | 105 | // that any other runner returns something we want to turn into a KService is | ||
107 | // unsafe, e.g. files from the Baloo runner might match a storageId just by | 106 | // unsafe, e.g. files from the Baloo runner might match a storageId just by | ||
108 | // accident, creating a dangerous false positive. | 107 | // accident, creating a dangerous false positive. | ||
▲ Show 20 Lines • Show All 150 Lines • Show Last 20 Lines |