summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)