Commit fa5b3bb3 authored by Volker Krause's avatar Volker Krause

Remove usage of KDBusConnectionPool

Summary:
As per T12722 this is no longer needed, QDBusConnection now behaves
correctly in a multi-threaded scenario.

Reviewers: davidedmundson

Reviewed By: davidedmundson

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D27606
parent f44bad6b
......@@ -32,7 +32,6 @@
#include <QUuid>
// KDE
#include <kdbusconnectionpool.h>
#include <klocalizedstring.h>
#include <kauthorized.h>
#include <kdelibs4migration.h>
......@@ -495,7 +494,7 @@ Activities::Activities(QObject *parent)
// Initializing D-Bus service
new ActivitiesAdaptor(this);
KDBusConnectionPool::threadConnection().registerObject(
QDBusConnection::sessionBus().registerObject(
KAMD_DBUS_OBJECT_PATH(Activities), this);
// Initializing config
......
......@@ -26,6 +26,7 @@
#include <QThread>
#include <QDir>
#include <QProcess>
#include <QDBusConnection>
#include <QDBusServiceWatcher>
#include <QDBusConnectionInterface>
#include <QDBusReply>
......@@ -35,7 +36,6 @@
#include <KPluginMetaData>
#include <KPluginLoader>
#include <ksharedconfig.h>
#include <kdbusconnectionpool.h>
#include <kdbusservice.h>
// Boost and utils
......@@ -138,7 +138,7 @@ Application::Application(int &argc, char **argv)
void Application::init()
{
if (!KDBusConnectionPool::threadConnection().registerService(
if (!QDBusConnection::sessionBus().registerService(
KAMD_DBUS_SERVICE)) {
QCoreApplication::exit(EXIT_SUCCESS);
}
......
......@@ -21,8 +21,8 @@
// Self
#include "Features.h"
// KDE
#include <kdbusconnectionpool.h>
// Qt
#include <QDBusConnection>
// Utils
#include <utils/d_ptr_implementation.h>
......@@ -40,7 +40,7 @@ Features::Features(QObject *parent)
, d()
{
new FeaturesAdaptor(this);
KDBusConnectionPool::threadConnection().registerObject(
QDBusConnection::sessionBus().registerObject(
KAMD_DBUS_OBJECT_PATH(Features), this);
}
......
......@@ -30,7 +30,6 @@
// KDE
#include <kwindowsystem.h>
#include <kdbusconnectionpool.h>
// Utils
#include <utils/d_ptr_implementation.h>
......@@ -271,7 +270,7 @@ Resources::Resources(QObject *parent)
qRegisterMetaType<WId>("WId");
new ResourcesAdaptor(this);
KDBusConnectionPool::threadConnection().registerObject(
QDBusConnection::sessionBus().registerObject(
KAMD_DBUS_OBJECT_PATH(Resources), this);
connect(KWindowSystem::self(), &KWindowSystem::windowRemoved,
......
......@@ -30,9 +30,6 @@
#include <QDBusPendingReply>
#include <QDBusPendingCallWatcher>
// KDE
#include <kdbusconnectionpool.h>
// Utils
#include <utils/d_ptr_implementation.h>
......
......@@ -19,12 +19,10 @@
#include "TemplatesPlugin.h"
// Qt
#include <QDBusConnection>
#include <QStringList>
#include <QString>
// KDE
#include <KDBusConnectionPool>
// Utils
#include <utils/for_each_assoc.h>
......@@ -42,7 +40,7 @@ TemplatesPlugin::TemplatesPlugin(QObject *parent, const QVariantList &args)
setName(QStringLiteral("org.kde.ActivityManager.ActivityTemplates"));
new TemplatesAdaptor(this);
KDBusConnectionPool::threadConnection().registerObject(QStringLiteral("/Templates"), this);
QDBusConnection::sessionBus().registerObject(QStringLiteral("/Templates"), this);
}
TemplatesPlugin::~TemplatesPlugin()
......
......@@ -21,9 +21,6 @@
// Qt
#include <QDBusConnection>
// KDE
#include <kdbusconnectionpool.h>
// Local
#include "slcadaptor.h"
......@@ -35,7 +32,7 @@ SlcPlugin::SlcPlugin(QObject *parent, const QVariantList &args)
Q_UNUSED(args);
new SLCAdaptor(this);
KDBusConnectionPool::threadConnection().registerObject(QStringLiteral("/SLC"), this);
QDBusConnection::sessionBus().registerObject(QStringLiteral("/SLC"), this);
}
SlcPlugin::~SlcPlugin()
......
......@@ -22,12 +22,12 @@
#include "ResourceLinking.h"
// Qt
#include <QDBusConnection>
#include <QFileSystemWatcher>
#include <QSqlQuery>
// KDE
#include <kconfig.h>
#include <kdbusconnectionpool.h>
#include <kdirnotify.h>
// Boost
......@@ -45,7 +45,7 @@ ResourceLinking::ResourceLinking(QObject *parent)
: QObject(parent)
{
new ResourcesLinkingAdaptor(this);
KDBusConnectionPool::threadConnection().registerObject(
QDBusConnection::sessionBus().registerObject(
QStringLiteral("/ActivityManager/Resources/Linking"), this);
}
......
......@@ -22,13 +22,13 @@
#include "StatsPlugin.h"
// Qt
#include <QDBusConnection>
#include <QFileSystemWatcher>
#include <QSqlQuery>
#include <QStringList>
// KDE
#include <kconfig.h>
#include <kdbusconnectionpool.h>
#include <kfileitem.h>
// Boost
......@@ -58,7 +58,7 @@ StatsPlugin::StatsPlugin(QObject *parent, const QVariantList &args)
s_instance = this;
new ResourcesScoringAdaptor(this);
KDBusConnectionPool::threadConnection().registerObject(
QDBusConnection::sessionBus().registerObject(
QStringLiteral("/ActivityManager/Resources/Scoring"), this);
setName(QStringLiteral("org.kde.ActivityManager.Resources.Scoring"));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment