Changeset View
Changeset View
Standalone View
Standalone View
src/service/plugins/sqlite/StatsPlugin.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 "StatsPlugin.h" | 22 | #include "StatsPlugin.h" | ||
23 | 23 | | |||
24 | // Qt | 24 | // Qt | ||
25 | #include <QDBusConnection> | ||||
25 | #include <QFileSystemWatcher> | 26 | #include <QFileSystemWatcher> | ||
26 | #include <QSqlQuery> | 27 | #include <QSqlQuery> | ||
27 | #include <QStringList> | 28 | #include <QStringList> | ||
28 | 29 | | |||
29 | // KDE | 30 | // KDE | ||
30 | #include <kconfig.h> | 31 | #include <kconfig.h> | ||
31 | #include <kdbusconnectionpool.h> | | |||
32 | #include <kfileitem.h> | 32 | #include <kfileitem.h> | ||
33 | 33 | | |||
34 | // Boost | 34 | // Boost | ||
35 | #include <boost/range/algorithm/binary_search.hpp> | 35 | #include <boost/range/algorithm/binary_search.hpp> | ||
36 | #include <utils/range.h> | 36 | #include <utils/range.h> | ||
37 | 37 | | |||
38 | // Local | 38 | // Local | ||
39 | #include "Database.h" | 39 | #include "Database.h" | ||
Show All 13 Lines | 51 | StatsPlugin::StatsPlugin(QObject *parent, const QVariantList &args) | |||
53 | , m_activities(nullptr) | 53 | , m_activities(nullptr) | ||
54 | , m_resources(nullptr) | 54 | , m_resources(nullptr) | ||
55 | , m_resourceLinking(new ResourceLinking(this)) | 55 | , m_resourceLinking(new ResourceLinking(this)) | ||
56 | { | 56 | { | ||
57 | Q_UNUSED(args); | 57 | Q_UNUSED(args); | ||
58 | s_instance = this; | 58 | s_instance = this; | ||
59 | 59 | | |||
60 | new ResourcesScoringAdaptor(this); | 60 | new ResourcesScoringAdaptor(this); | ||
61 | KDBusConnectionPool::threadConnection().registerObject( | 61 | QDBusConnection::sessionBus().registerObject( | ||
62 | QStringLiteral("/ActivityManager/Resources/Scoring"), this); | 62 | QStringLiteral("/ActivityManager/Resources/Scoring"), this); | ||
63 | 63 | | |||
64 | setName(QStringLiteral("org.kde.ActivityManager.Resources.Scoring")); | 64 | setName(QStringLiteral("org.kde.ActivityManager.Resources.Scoring")); | ||
65 | } | 65 | } | ||
66 | 66 | | |||
67 | bool StatsPlugin::init(QHash<QString, QObject *> &modules) | 67 | bool StatsPlugin::init(QHash<QString, QObject *> &modules) | ||
68 | { | 68 | { | ||
69 | Plugin::init(modules); | 69 | Plugin::init(modules); | ||
▲ Show 20 Lines • Show All 654 Lines • Show Last 20 Lines |