From 98eef668e68d77eacc2aa8ac92678af84f07167f Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 8 Jul 2015 01:27:56 +0200 Subject: [PATCH] Mark QDBusSlotCache{,::Data} shared The compiler-generated move operations are ok. Change-Id: Iec0fed49d52ace5ca7dae2c7ee53d717a283f15a Reviewed-by: Thiago Macieira --- src/dbus/qdbusintegrator_p.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/dbus/qdbusintegrator_p.h b/src/dbus/qdbusintegrator_p.h index cd358569df..95eeed3fff 100644 --- a/src/dbus/qdbusintegrator_p.h +++ b/src/dbus/qdbusintegrator_p.h @@ -76,10 +76,21 @@ struct QDBusSlotCache int flags; int slotIdx; QVector metaTypes; + + void swap(Data &other) Q_DECL_NOTHROW + { + qSwap(flags, other.flags); + qSwap(slotIdx, other.slotIdx); + qSwap(metaTypes, other.metaTypes); + } }; typedef QMultiHash Hash; Hash hash; + + void swap(QDBusSlotCache &other) Q_DECL_NOTHROW { qSwap(hash, other.hash); } }; +Q_DECLARE_SHARED(QDBusSlotCache::Data) +Q_DECLARE_SHARED(QDBusSlotCache) class QDBusCallDeliveryEvent: public QMetaCallEvent {