summaryrefslogtreecommitdiffstats
path: root/src/dbus
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2015-07-08 01:13:37 +0200
committerMarc Mutz <marc.mutz@kdab.com>2015-07-19 10:33:23 +0000
commit94c24fad59ef1f62838108f9d460cb25e69e55b4 (patch)
tree28edf0ad159c764397f485c034b78fe534b663f4 /src/dbus
parentf79dee684423429a7400fa9f2fe1d324c7d0c96a (diff)
QDBusConnection: declare as shared-come-Qt6
Requires adding member-swap and (at least in my copy) move operations. Change-Id: I1b638a81e4a41f467e69e352806524039e7b9f27 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/dbus')
-rw-r--r--src/dbus/qdbusconnection.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/dbus/qdbusconnection.h b/src/dbus/qdbusconnection.h
index 4cf7e22ebe..8b2e9234aa 100644
--- a/src/dbus/qdbusconnection.h
+++ b/src/dbus/qdbusconnection.h
@@ -122,9 +122,14 @@ public:
explicit QDBusConnection(const QString &name);
QDBusConnection(const QDBusConnection &other);
+#ifdef Q_COMPILER_RVALUE_REFS
+ QDBusConnection(QDBusConnection &&other) Q_DECL_NOTHROW : d(other.d) { other.d = Q_NULLPTR; }
+ QDBusConnection &operator=(QDBusConnection &&other) Q_DECL_NOTHROW { swap(other); return *this; }
+#endif
+ QDBusConnection &operator=(const QDBusConnection &other);
~QDBusConnection();
- QDBusConnection &operator=(const QDBusConnection &other);
+ void swap(QDBusConnection &other) Q_DECL_NOTHROW { qSwap(d, other.d); }
bool isConnected() const;
QString baseService() const;
@@ -200,6 +205,7 @@ private:
friend class QDBusConnectionPrivate;
QDBusConnectionPrivate *d;
};
+Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QDBusConnection)
Q_DECLARE_OPERATORS_FOR_FLAGS(QDBusConnection::RegisterOptions)
Q_DECLARE_OPERATORS_FOR_FLAGS(QDBusConnection::VirtualObjectRegisterOptions)