QDBusMessage: declare as shared-come-Qt6

Requires adding member-swap and (at least in my copy) move assignment.

Since the type does not contain a d == nullptr state,
a move constructor isn't yet possible.

Change-Id: Iad6939fa30f214591eab1fdf30a2cf1423ffb32a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Marc Mutz 2015-07-08 01:31:05 +02:00
parent 84769bbbce
commit 15a5035671

View File

@ -62,9 +62,14 @@ public:
QDBusMessage();
QDBusMessage(const QDBusMessage &other);
#ifdef Q_COMPILER_RVALUE_REFS
QDBusMessage &operator=(QDBusMessage &&other) Q_DECL_NOTHROW { swap(other); return *this; }
#endif
QDBusMessage &operator=(const QDBusMessage &other);
~QDBusMessage();
void swap(QDBusMessage &other) Q_DECL_NOTHROW { qSwap(d_ptr, other.d_ptr); }
static QDBusMessage createSignal(const QString &path, const QString &interface,
const QString &name);
static QDBusMessage createTargetedSignal(const QString &service, const QString &path,
@ -117,6 +122,7 @@ private:
friend class QDBusMessagePrivate;
QDBusMessagePrivate *d_ptr;
};
Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QDBusMessage)
#ifndef QT_NO_DEBUG_STREAM
Q_DBUS_EXPORT QDebug operator<<(QDebug, const QDBusMessage &);