summaryrefslogtreecommitdiffstats
path: root/src/dbus/qdbusargument.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2015-07-08 01:12:22 +0200
committerMarc Mutz <marc.mutz@kdab.com>2015-07-18 13:32:53 +0000
commit188a8a7f1d5560350749a4f8fa8c205ef3efc215 (patch)
treea2239ab61674c8f3c5f4488f41c302533b130a02 /src/dbus/qdbusargument.h
parent9ed9787b7e1f74255c63e0ba867fbf9747aaf851 (diff)
QDBusArgument: declare as shared-come-Qt6
Requires adding member-swap and (at least in my copy) move operations. Change-Id: I0b32c387809c972203c94677616fe0a52143ec3b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/dbus/qdbusargument.h')
-rw-r--r--src/dbus/qdbusargument.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/dbus/qdbusargument.h b/src/dbus/qdbusargument.h
index 6d34a8d226..a6bc396861 100644
--- a/src/dbus/qdbusargument.h
+++ b/src/dbus/qdbusargument.h
@@ -70,9 +70,15 @@ public:
QDBusArgument();
QDBusArgument(const QDBusArgument &other);
+#ifdef Q_COMPILER_RVALUE_REFS
+ QDBusArgument(QDBusArgument &&other) Q_DECL_NOTHROW : d(other.d) { other.d = Q_NULLPTR; }
+ QDBusArgument &operator=(QDBusArgument &&other) Q_DECL_NOTHROW { swap(other); return *this; }
+#endif
QDBusArgument &operator=(const QDBusArgument &other);
~QDBusArgument();
+ void swap(QDBusArgument &other) Q_DECL_NOTHROW { qSwap(d, other.d); }
+
// used for marshalling (Qt -> D-BUS)
QDBusArgument &operator<<(uchar arg);
QDBusArgument &operator<<(bool arg);
@@ -140,6 +146,7 @@ protected:
friend class QDBusArgumentPrivate;
mutable QDBusArgumentPrivate *d;
};
+Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QDBusArgument)
QT_END_NAMESPACE
Q_DECLARE_METATYPE(QDBusArgument)