Changeset View
Changeset View
Standalone View
Standalone View
src/widgets/kdesktopfileactions.cpp
Show First 20 Lines • Show All 287 Lines • ▼ Show 20 Line(s) | 287 | } else { | |||
---|---|---|---|---|---|
288 | qCWarning(KIO_WIDGETS) << "The desktop file" << service.entryPath() | 288 | qCWarning(KIO_WIDGETS) << "The desktop file" << service.entryPath() | ||
289 | << "has an invalid X-KDE-GetActionMenu entry." | 289 | << "has an invalid X-KDE-GetActionMenu entry." | ||
290 | << "Syntax is: app object interface function"; | 290 | << "Syntax is: app object interface function"; | ||
291 | } | 291 | } | ||
292 | } | 292 | } | ||
293 | 293 | | |||
294 | // Now, either keys is empty (all actions) or it's set to the actions we want | 294 | // Now, either keys is empty (all actions) or it's set to the actions we want | ||
295 | 295 | | |||
296 | foreach (const KServiceAction &action, service.actions()) { | 296 | const QList<KServiceAction> list = service.actions(); | ||
297 | for (const KServiceAction &action : list) { | ||||
297 | if (keys.isEmpty() || keys.contains(action.name())) { | 298 | if (keys.isEmpty() || keys.contains(action.name())) { | ||
298 | const QString exec = action.exec(); | 299 | const QString exec = action.exec(); | ||
299 | if (bLocalFiles || exec.contains(QLatin1String("%U")) || exec.contains(QLatin1String("%u"))) { | 300 | if (bLocalFiles || exec.contains(QLatin1String("%U")) || exec.contains(QLatin1String("%u"))) { | ||
300 | result.append(action); | 301 | result.append(action); | ||
301 | } | 302 | } | ||
302 | } | 303 | } | ||
303 | } | 304 | } | ||
304 | 305 | | |||
▲ Show 20 Lines • Show All 90 Lines • Show Last 20 Lines |