diff --git a/applets/kicker/plugin/runnermatchesmodel.cpp b/applets/kicker/plugin/runnermatchesmodel.cpp index 4804d2e12..154ab3324 100644 --- a/applets/kicker/plugin/runnermatchesmodel.cpp +++ b/applets/kicker/plugin/runnermatchesmodel.cpp @@ -166,6 +166,28 @@ bool RunnerMatchesModel::trigger(int row, const QString &actionId, const QVarian return false; } + // BUG 442970: Skip creating KService if there is no actionId, or the action is from a runner. + if (actionId.isEmpty() || actionId == QLatin1String("runnerAction")) { + if (!actionId.isEmpty()) { + QObject *obj = argument.value(); + + if (!obj) { + return false; + } + + QAction *action = qobject_cast(obj); + + if (!action) { + return false; + } + match.setSelectedAction(action); + } + + m_runnerManager->run(match); + + return true; + } + QObject *appletInterface = static_cast(parent())->appletInterface(); KService::Ptr service = KService::serviceByStorageId(match.data().toUrl().toString(QUrl::RemoveScheme)); @@ -189,25 +211,7 @@ bool RunnerMatchesModel::trigger(int row, const QString &actionId, const QVarian return Kicker::handleRecentDocumentAction(service, actionId, argument); } - if (!actionId.isEmpty()) { - QObject *obj = argument.value(); - - if (!obj) { - return false; - } - - QAction *action = qobject_cast(obj); - - if (!action) { - return false; - } - - match.setSelectedAction(action); - } - - m_runnerManager->run(match); - - return true; + return false; } void RunnerMatchesModel::setMatches(const QList &matches)