Changeset View
Changeset View
Standalone View
Standalone View
src/service/plugins/sqlite/ResourceLinking.cpp
Show All 16 Lines | |||||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | // Self | 20 | // Self | ||
21 | #include <kactivities-features.h> | 21 | #include <kactivities-features.h> | ||
22 | #include "ResourceLinking.h" | 22 | #include "ResourceLinking.h" | ||
23 | 23 | | |||
24 | // Qt | 24 | // Qt | ||
25 | #include <QDBusConnection> | ||||
25 | #include <QFileSystemWatcher> | 26 | #include <QFileSystemWatcher> | ||
26 | #include <QSqlQuery> | 27 | #include <QSqlQuery> | ||
27 | 28 | | |||
28 | // KDE | 29 | // KDE | ||
29 | #include <kconfig.h> | 30 | #include <kconfig.h> | ||
30 | #include <kdbusconnectionpool.h> | | |||
31 | #include <kdirnotify.h> | 31 | #include <kdirnotify.h> | ||
32 | 32 | | |||
33 | // Boost | 33 | // Boost | ||
34 | #include <boost/range/algorithm/binary_search.hpp> | 34 | #include <boost/range/algorithm/binary_search.hpp> | ||
35 | #include <utils/range.h> | 35 | #include <utils/range.h> | ||
36 | 36 | | |||
37 | // Local | 37 | // Local | ||
38 | #include "DebugResources.h" | 38 | #include "DebugResources.h" | ||
39 | #include "Database.h" | 39 | #include "Database.h" | ||
40 | #include "Utils.h" | 40 | #include "Utils.h" | ||
41 | #include "StatsPlugin.h" | 41 | #include "StatsPlugin.h" | ||
42 | #include "resourcelinkingadaptor.h" | 42 | #include "resourcelinkingadaptor.h" | ||
43 | 43 | | |||
44 | ResourceLinking::ResourceLinking(QObject *parent) | 44 | ResourceLinking::ResourceLinking(QObject *parent) | ||
45 | : QObject(parent) | 45 | : QObject(parent) | ||
46 | { | 46 | { | ||
47 | new ResourcesLinkingAdaptor(this); | 47 | new ResourcesLinkingAdaptor(this); | ||
48 | KDBusConnectionPool::threadConnection().registerObject( | 48 | QDBusConnection::sessionBus().registerObject( | ||
49 | QStringLiteral("/ActivityManager/Resources/Linking"), this); | 49 | QStringLiteral("/ActivityManager/Resources/Linking"), this); | ||
50 | } | 50 | } | ||
51 | 51 | | |||
52 | void ResourceLinking::init() | 52 | void ResourceLinking::init() | ||
53 | { | 53 | { | ||
54 | auto activities = StatsPlugin::self()->activitiesInterface(); | 54 | auto activities = StatsPlugin::self()->activitiesInterface(); | ||
55 | 55 | | |||
56 | connect(activities, SIGNAL(CurrentActivityChanged(QString)), | 56 | connect(activities, SIGNAL(CurrentActivityChanged(QString)), | ||
▲ Show 20 Lines • Show All 260 Lines • Show Last 20 Lines |