Changeset View
Changeset View
Standalone View
Standalone View
src/service/Application.cpp
Show All 20 Lines | |||||
21 | // Self | 21 | // Self | ||
22 | #include <kactivities-features.h> | 22 | #include <kactivities-features.h> | ||
23 | #include "Application.h" | 23 | #include "Application.h" | ||
24 | 24 | | |||
25 | // Qt | 25 | // Qt | ||
26 | #include <QThread> | 26 | #include <QThread> | ||
27 | #include <QDir> | 27 | #include <QDir> | ||
28 | #include <QProcess> | 28 | #include <QProcess> | ||
29 | #include <QDBusConnection> | ||||
29 | #include <QDBusServiceWatcher> | 30 | #include <QDBusServiceWatcher> | ||
30 | #include <QDBusConnectionInterface> | 31 | #include <QDBusConnectionInterface> | ||
31 | #include <QDBusReply> | 32 | #include <QDBusReply> | ||
32 | 33 | | |||
33 | // KDE | 34 | // KDE | ||
34 | #include <KCrash> | 35 | #include <KCrash> | ||
35 | #include <KPluginMetaData> | 36 | #include <KPluginMetaData> | ||
36 | #include <KPluginLoader> | 37 | #include <KPluginLoader> | ||
37 | #include <ksharedconfig.h> | 38 | #include <ksharedconfig.h> | ||
38 | #include <kdbusconnectionpool.h> | | |||
39 | #include <kdbusservice.h> | 39 | #include <kdbusservice.h> | ||
40 | 40 | | |||
41 | // Boost and utils | 41 | // Boost and utils | ||
42 | #include <boost/range/adaptor/filtered.hpp> | 42 | #include <boost/range/adaptor/filtered.hpp> | ||
43 | #include <boost/range/adaptor/transformed.hpp> | 43 | #include <boost/range/adaptor/transformed.hpp> | ||
44 | #include <utils/d_ptr_implementation.h> | 44 | #include <utils/d_ptr_implementation.h> | ||
45 | 45 | | |||
46 | // System | 46 | // System | ||
▲ Show 20 Lines • Show All 86 Lines • ▼ Show 20 Line(s) | |||||
133 | 133 | | |||
134 | Application::Application(int &argc, char **argv) | 134 | Application::Application(int &argc, char **argv) | ||
135 | : QApplication(argc, argv) | 135 | : QApplication(argc, argv) | ||
136 | { | 136 | { | ||
137 | } | 137 | } | ||
138 | 138 | | |||
139 | void Application::init() | 139 | void Application::init() | ||
140 | { | 140 | { | ||
141 | if (!KDBusConnectionPool::threadConnection().registerService( | 141 | if (!QDBusConnection::sessionBus().registerService( | ||
142 | KAMD_DBUS_SERVICE)) { | 142 | KAMD_DBUS_SERVICE)) { | ||
143 | QCoreApplication::exit(EXIT_SUCCESS); | 143 | QCoreApplication::exit(EXIT_SUCCESS); | ||
144 | } | 144 | } | ||
145 | 145 | | |||
146 | // KAMD is a daemon, if it crashes it is not a problem as | 146 | // KAMD is a daemon, if it crashes it is not a problem as | ||
147 | // long as it restarts properly | 147 | // long as it restarts properly | ||
148 | // TODO: Restart on crash | 148 | // TODO: Restart on crash | ||
149 | // KCrash::setFlags(KCrash::AutoRestart); | 149 | // KCrash::setFlags(KCrash::AutoRestart); | ||
▲ Show 20 Lines • Show All 165 Lines • Show Last 20 Lines |