Changeset View
Changeset View
Standalone View
Standalone View
src/plugin/kdbusservicestarter.cpp
Show All 19 Lines | |||||
20 | #include "kservicetypetrader.h" | 20 | #include "kservicetypetrader.h" | ||
21 | #include "kservice.h" | 21 | #include "kservice.h" | ||
22 | #include <klocalizedstring.h> | 22 | #include <klocalizedstring.h> | ||
23 | #include <ktoolinvocation.h> | 23 | #include <ktoolinvocation.h> | ||
24 | #include <QDBusConnection> | 24 | #include <QDBusConnection> | ||
25 | #include <QDBusConnectionInterface> | 25 | #include <QDBusConnectionInterface> | ||
26 | #include <QDebug> | 26 | #include <QDebug> | ||
27 | 27 | | |||
28 | #if KSERVICE_BUILD_DEPRECATED_SINCE(5, 61) | ||||
29 | | ||||
28 | class KDBusServiceStarterPrivate | 30 | class KDBusServiceStarterPrivate | ||
29 | { | 31 | { | ||
30 | public: | 32 | public: | ||
31 | KDBusServiceStarterPrivate() : q(nullptr) {} | 33 | KDBusServiceStarterPrivate() : q(nullptr) {} | ||
32 | ~KDBusServiceStarterPrivate() | 34 | ~KDBusServiceStarterPrivate() | ||
33 | { | 35 | { | ||
34 | delete q; | 36 | delete q; | ||
35 | } | 37 | } | ||
▲ Show 20 Lines • Show All 70 Lines • ▼ Show 20 Line(s) | 107 | { | |||
106 | const KService::List offers = KServiceTypeTrader::self()->query(serviceType, constraint); | 108 | const KService::List offers = KServiceTypeTrader::self()->query(serviceType, constraint); | ||
107 | if (offers.isEmpty()) { | 109 | if (offers.isEmpty()) { | ||
108 | return -1; | 110 | return -1; | ||
109 | } | 111 | } | ||
110 | KService::Ptr ptr = offers.first(); | 112 | KService::Ptr ptr = offers.first(); | ||
111 | //qDebug() << "starting" << ptr->entryPath(); | 113 | //qDebug() << "starting" << ptr->entryPath(); | ||
112 | return KToolInvocation::startServiceByDesktopPath(ptr->entryPath(), QStringList(), error, dbusService); | 114 | return KToolInvocation::startServiceByDesktopPath(ptr->entryPath(), QStringList(), error, dbusService); | ||
113 | } | 115 | } | ||
116 | | ||||
117 | #endif |