Changeset View
Changeset View
Standalone View
Standalone View
applets/kicker/plugin/appentry.cpp
Show All 29 Lines | |||||
30 | #include <QStandardPaths> | 30 | #include <QStandardPaths> | ||
31 | #if HAVE_X11 | 31 | #if HAVE_X11 | ||
32 | #include <QX11Info> | 32 | #include <QX11Info> | ||
33 | #endif | 33 | #endif | ||
34 | 34 | | |||
35 | #include <KActivities/ResourceInstance> | 35 | #include <KActivities/ResourceInstance> | ||
36 | #include <KConfigGroup> | 36 | #include <KConfigGroup> | ||
37 | #include <KJob> | 37 | #include <KJob> | ||
38 | #include <KIO/ApplicationLauncherJob> | ||||
38 | #include <KLocalizedString> | 39 | #include <KLocalizedString> | ||
39 | #include <KMimeTypeTrader> | 40 | #include <KMimeTypeTrader> | ||
41 | #include <KNotificationJobUiDelegate> | ||||
40 | #include <KRun> | 42 | #include <KRun> | ||
broulik: Looks unused now? | |||||
No there's a KRun::run in this file. I only ported runService/runApplication in this commit. dfaure: No there's a KRun::run in this file. I only ported runService/runApplication in this commit. | |||||
Stupid highlighting, I had Ctrl+F for "KRun" but it didn't highlight int :) broulik: Stupid highlighting, I had Ctrl+F for "KRun" but it didn't highlight int :) | |||||
41 | #include <KSycoca> | 43 | #include <KSycoca> | ||
42 | #include <KShell> | 44 | #include <KShell> | ||
43 | #include <KSharedConfig> | 45 | #include <KSharedConfig> | ||
44 | #include <KStartupInfo> | 46 | #include <KStartupInfo> | ||
45 | 47 | | |||
46 | #include <Plasma/Plasma> | 48 | #include <Plasma/Plasma> | ||
47 | 49 | | |||
48 | AppEntry::AppEntry(AbstractModel *owner, KService::Ptr service, NameFormat nameFormat) | 50 | AppEntry::AppEntry(AbstractModel *owner, KService::Ptr service, NameFormat nameFormat) | ||
▲ Show 20 Lines • Show All 149 Lines • ▼ Show 20 Line(s) | 199 | if (actionId.isEmpty()) { | |||
198 | quint32 timeStamp = 0; | 200 | quint32 timeStamp = 0; | ||
199 | 201 | | |||
200 | #if HAVE_X11 | 202 | #if HAVE_X11 | ||
201 | if (QX11Info::isPlatformX11()) { | 203 | if (QX11Info::isPlatformX11()) { | ||
202 | timeStamp = QX11Info::appUserTime(); | 204 | timeStamp = QX11Info::appUserTime(); | ||
203 | } | 205 | } | ||
204 | #endif | 206 | #endif | ||
205 | 207 | | |||
206 | KRun::runApplication(*m_service, {}, nullptr, KRun::DeleteTemporaryFiles, {}, KStartupInfo::createNewStartupIdForTimestamp(timeStamp)); | 208 | auto *job = new KIO::ApplicationLauncherJob(m_service); | ||
209 | job->setUiDelegate(new KNotificationJobUiDelegate(KJobUiDelegate::AutoHandlingEnabled)); | ||||
210 | job->setRunFlags(KIO::ApplicationLauncherJob::DeleteTemporaryFiles); | ||||
211 | job->setStartupId(KStartupInfo::createNewStartupIdForTimestamp(timeStamp)); | ||||
212 | job->start(); | ||||
207 | 213 | | |||
208 | KActivities::ResourceInstance::notifyAccessed(QUrl(QStringLiteral("applications:") + m_service->storageId()), | 214 | KActivities::ResourceInstance::notifyAccessed(QUrl(QStringLiteral("applications:") + m_service->storageId()), | ||
209 | QStringLiteral("org.kde.plasma.kicker")); | 215 | QStringLiteral("org.kde.plasma.kicker")); | ||
210 | 216 | | |||
211 | return true; | 217 | return true; | ||
212 | } | 218 | } | ||
213 | 219 | | |||
214 | QObject *appletInterface = m_owner->rootModel()->property("appletInterface").value<QObject *>(); | 220 | QObject *appletInterface = m_owner->rootModel()->property("appletInterface").value<QObject *>(); | ||
▲ Show 20 Lines • Show All 93 Lines • Show Last 20 Lines |
Looks unused now?