Changeset View
Changeset View
Standalone View
Standalone View
src/service/plugins/activitytemplates/TemplatesPlugin.cpp
Show All 13 Lines | |||||
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | 16 | */ | ||
17 | 17 | | |||
18 | // Self | 18 | // Self | ||
19 | #include "TemplatesPlugin.h" | 19 | #include "TemplatesPlugin.h" | ||
20 | 20 | | |||
21 | // Qt | 21 | // Qt | ||
22 | #include <QDBusConnection> | ||||
22 | #include <QStringList> | 23 | #include <QStringList> | ||
23 | #include <QString> | 24 | #include <QString> | ||
24 | 25 | | |||
25 | // KDE | | |||
26 | #include <KDBusConnectionPool> | | |||
27 | | ||||
28 | // Utils | 26 | // Utils | ||
29 | #include <utils/for_each_assoc.h> | 27 | #include <utils/for_each_assoc.h> | ||
30 | 28 | | |||
31 | // Local | 29 | // Local | ||
32 | #include "templatesadaptor.h" | 30 | #include "templatesadaptor.h" | ||
33 | 31 | | |||
34 | KAMD_EXPORT_PLUGIN(templatesplugin, TemplatesPlugin, "kactivitymanagerd-plugin-activitytemplates.json") | 32 | KAMD_EXPORT_PLUGIN(templatesplugin, TemplatesPlugin, "kactivitymanagerd-plugin-activitytemplates.json") | ||
35 | 33 | | |||
36 | 34 | | |||
37 | TemplatesPlugin::TemplatesPlugin(QObject *parent, const QVariantList &args) | 35 | TemplatesPlugin::TemplatesPlugin(QObject *parent, const QVariantList &args) | ||
38 | : Plugin(parent) | 36 | : Plugin(parent) | ||
39 | { | 37 | { | ||
40 | Q_UNUSED(args); | 38 | Q_UNUSED(args); | ||
41 | 39 | | |||
42 | setName(QStringLiteral("org.kde.ActivityManager.ActivityTemplates")); | 40 | setName(QStringLiteral("org.kde.ActivityManager.ActivityTemplates")); | ||
43 | 41 | | |||
44 | new TemplatesAdaptor(this); | 42 | new TemplatesAdaptor(this); | ||
45 | KDBusConnectionPool::threadConnection().registerObject(QStringLiteral("/Templates"), this); | 43 | QDBusConnection::sessionBus().registerObject(QStringLiteral("/Templates"), this); | ||
46 | } | 44 | } | ||
47 | 45 | | |||
48 | TemplatesPlugin::~TemplatesPlugin() | 46 | TemplatesPlugin::~TemplatesPlugin() | ||
49 | { | 47 | { | ||
50 | } | 48 | } | ||
51 | 49 | | |||
52 | bool TemplatesPlugin::init(QHash<QString, QObject *> &modules) | 50 | bool TemplatesPlugin::init(QHash<QString, QObject *> &modules) | ||
53 | { | 51 | { | ||
▲ Show 20 Lines • Show All 94 Lines • Show Last 20 Lines |