Changeset View
Changeset View
Standalone View
Standalone View
src/Gui/ExportMenu.cpp
Show First 20 Lines • Show All 76 Lines • ▼ Show 20 Line(s) | |||||
77 | { | 77 | { | ||
78 | // populate all locally installed applications and services | 78 | // populate all locally installed applications and services | ||
79 | // which can handle images first | 79 | // which can handle images first | ||
80 | 80 | | |||
81 | const KService::List services = KMimeTypeTrader::self()->query(QStringLiteral("image/png")); | 81 | const KService::List services = KMimeTypeTrader::self()->query(QStringLiteral("image/png")); | ||
82 | 82 | | |||
83 | Q_FOREACH (auto service, services) { | 83 | Q_FOREACH (auto service, services) { | ||
84 | QString name = service->name().replace(QLatin1Char('&'), QLatin1String("&&")); | 84 | QString name = service->name().replace(QLatin1Char('&'), QLatin1String("&&")); | ||
85 | QAction *action = new QAction(QIcon::fromTheme(service->icon()), name, this); | 85 | QAction *action = new QAction(QIcon::fromTheme(service->icon()), name, nullptr); | ||
86 | 86 | | |||
87 | connect(action, &QAction::triggered, [=]() { | 87 | connect(action, &QAction::triggered, [=]() { | ||
88 | QList<QUrl> whereIs({ mExportManager->tempSave() }); | 88 | QList<QUrl> whereIs({ mExportManager->tempSave() }); | ||
89 | KRun::runService(*service, whereIs, parentWidget(), true); | 89 | KRun::runService(*service, whereIs, parentWidget(), true); | ||
90 | }); | 90 | }); | ||
91 | addAction(action); | 91 | addAction(action); | ||
92 | } | 92 | } | ||
93 | 93 | | |||
▲ Show 20 Lines • Show All 113 Lines • Show Last 20 Lines |