summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2015-06-25 18:41:14 +0200
committerMarc Mutz <marc.mutz@kdab.com>2015-06-30 10:57:27 +0000
commitbc1804fa7247502b27a0501ec030e398a95bf367 (patch)
tree81c0c259a10e1f890b760e093f6e893aff54c059 /src
parentf815676b7d46cfe6e79985dee9fce182edb346d7 (diff)
QtDBus: make all Q_DECLARE_SHARED types nothrow move-assignable
Change-Id: I5b04fb44b632a0bbb290199fc092b3ffd8289650 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src')
-rw-r--r--src/dbus/qdbuspendingcall.h5
-rw-r--r--src/dbus/qdbusunixfiledescriptor.h10
2 files changed, 8 insertions, 7 deletions
diff --git a/src/dbus/qdbuspendingcall.h b/src/dbus/qdbuspendingcall.h
index 99d261d05b..8bca64cd9a 100644
--- a/src/dbus/qdbuspendingcall.h
+++ b/src/dbus/qdbuspendingcall.h
@@ -56,9 +56,12 @@ class Q_DBUS_EXPORT QDBusPendingCall
public:
QDBusPendingCall(const QDBusPendingCall &other);
~QDBusPendingCall();
+#ifdef Q_COMPILER_RVALUE_REFS
+ QDBusPendingCall &operator=(QDBusPendingCall &&other) Q_DECL_NOTHROW { swap(other); return *this; }
+#endif
QDBusPendingCall &operator=(const QDBusPendingCall &other);
- void swap(QDBusPendingCall &other) { qSwap(d, other.d); }
+ void swap(QDBusPendingCall &other) Q_DECL_NOTHROW { qSwap(d, other.d); }
#ifndef Q_QDOC
// pretend that they aren't here
diff --git a/src/dbus/qdbusunixfiledescriptor.h b/src/dbus/qdbusunixfiledescriptor.h
index 35e9d87cf3..9fb6eb44c7 100644
--- a/src/dbus/qdbusunixfiledescriptor.h
+++ b/src/dbus/qdbusunixfiledescriptor.h
@@ -55,10 +55,13 @@ public:
QDBusUnixFileDescriptor();
explicit QDBusUnixFileDescriptor(int fileDescriptor);
QDBusUnixFileDescriptor(const QDBusUnixFileDescriptor &other);
+#if defined(Q_COMPILER_RVALUE_REFS)
+ QDBusUnixFileDescriptor &operator=(QDBusUnixFileDescriptor &&other) Q_DECL_NOTHROW { swap(other); return *this; }
+#endif
QDBusUnixFileDescriptor &operator=(const QDBusUnixFileDescriptor &other);
~QDBusUnixFileDescriptor();
- void swap(QDBusUnixFileDescriptor &other)
+ void swap(QDBusUnixFileDescriptor &other) Q_DECL_NOTHROW
{ qSwap(d, other.d); }
bool isValid() const;
@@ -71,11 +74,6 @@ public:
static bool isSupported();
-#if defined(Q_COMPILER_RVALUE_REFS)
- inline QDBusUnixFileDescriptor &operator=(QDBusUnixFileDescriptor &&other)
- { d.swap(other.d); return *this; }
-#endif
-
protected:
typedef QExplicitlySharedDataPointer<QDBusUnixFileDescriptorPrivate> Data;
Data d;