summaryrefslogtreecommitdiffstats
path: root/src/dbus/qdbusconnection_p.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2015-04-03 23:09:50 -0700
committerThiago Macieira <thiago.macieira@intel.com>2015-09-15 02:09:01 +0000
commit8888eae0d3da23f233ce49cd3457885998444db4 (patch)
tree45cb47cff81bedeb7ea63bd3c1e4bdbe2541a5be /src/dbus/qdbusconnection_p.h
parent75f6f1d8439ce9874bf31905210ff5be3afa213a (diff)
Merge two more QDBusConnectionPrivate members into a union
QDBusConnectionPrivate can only be a client or a server, not both, so the DBusServer and DBusConnection pointers can be shared, like the QDBusConnectionInterface and QDBusServer pointers in the other anonymous union. Change-Id: I9a75ad8521ae4e5cbbe5ffff13d1baa8ab83c42f Reviewed-by: Albert Astals Cid <aacid@kde.org> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/dbus/qdbusconnection_p.h')
-rw-r--r--src/dbus/qdbusconnection_p.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dbus/qdbusconnection_p.h b/src/dbus/qdbusconnection_p.h
index e12b77837e..49c7564566 100644
--- a/src/dbus/qdbusconnection_p.h
+++ b/src/dbus/qdbusconnection_p.h
@@ -303,8 +303,10 @@ public:
// the dispatch lock protects everything related to the DBusConnection or DBusServer
// including the timeouts and watches
QMutex dispatchLock;
- DBusConnection *connection;
- DBusServer *server;
+ union {
+ DBusConnection *connection;
+ DBusServer *server;
+ };
WatcherHash watchers;
TimeoutHash timeouts;
PendingTimeoutList timeoutsPendingAdd;