summaryrefslogtreecommitdiffstats
path: root/src/dbus/qdbusconnectionmanager_p.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2016-04-28 15:00:58 -0700
committerJani Heikkinen <jani.heikkinen@qt.io>2017-05-11 08:35:24 +0000
commitdaeb334039e9dcc01485995f53552749131a06b7 (patch)
treeafff54bf1de633927ae196debf02dbd02d53c70a /src/dbus/qdbusconnectionmanager_p.h
parent74d79fcf1a6d85f5949bfaf2defa9403494124a9 (diff)
Merge the QDBusMetaType's custom information to QDBusConnectionManager
This allows us to get rid of two Q_GLOBAL_STATIC in QtDBus, which means fewer opportunities for screwing up the order of destruction. And since QDBusConnectionManager now ensures that the types are initialized, we don't need to re-initialize them everywhere. The Q_GLOBAL_STATIC for QDBusConnectionManager ensures the proper thread-safe locking, so we don't need to lock for every type that we're trying to register. This should make things faster. But as a side-effect, trying to register a D-Bus metatype will cause the QDBusConnectionManager thread to start too. Change-Id: Ifea6e497f11a461db432ffff1449a4e535234485 Reviewed-by: René J.V. Bertin <rjvbertin@gmail.com> Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/dbus/qdbusconnectionmanager_p.h')
-rw-r--r--src/dbus/qdbusconnectionmanager_p.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dbus/qdbusconnectionmanager_p.h b/src/dbus/qdbusconnectionmanager_p.h
index 1c7dea811d..fd6cd84677 100644
--- a/src/dbus/qdbusconnectionmanager_p.h
+++ b/src/dbus/qdbusconnectionmanager_p.h
@@ -55,13 +55,14 @@
#include <QtDBus/private/qtdbusglobal_p.h>
#include "qdbusconnection_p.h"
+#include "qdbusmetatype_p.h"
#include "private/qthread_p.h"
#ifndef QT_NO_DBUS
QT_BEGIN_NAMESPACE
-class QDBusConnectionManager : public QDaemonThread
+class QDBusConnectionManager : public QDaemonThread, public QDBusMetaTypeId
{
Q_OBJECT
struct ConnectionRequestData;