summaryrefslogtreecommitdiffstats
path: root/src/network/kernel/qhostaddress.h
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:50 +0000
commit65343eb28369823fd0c86384b488c3b7440d908a (patch)
tree5af5b7dad34eee5c15f605bace0f046805ba07c7 /src/network/kernel/qhostaddress.h
parentbc1804fa7247502b27a0501ec030e398a95bf367 (diff)
QtNetwork: make all Q_DECLARE_SHARED types nothrow move-assignable
Change-Id: Ib29ec4b73a4cdc51074997f7d167c289cf5af7a4 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/network/kernel/qhostaddress.h')
-rw-r--r--src/network/kernel/qhostaddress.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/network/kernel/qhostaddress.h b/src/network/kernel/qhostaddress.h
index 0c2229c334..8478240d28 100644
--- a/src/network/kernel/qhostaddress.h
+++ b/src/network/kernel/qhostaddress.h
@@ -84,9 +84,16 @@ public:
QHostAddress(SpecialAddress address);
~QHostAddress();
+#ifdef Q_COMPILER_RVALUE_REFS
+ QHostAddress &operator=(QHostAddress &&other) Q_DECL_NOTHROW
+ { swap(other); return *this; }
+#endif
+
QHostAddress &operator=(const QHostAddress &other);
QHostAddress &operator=(const QString &address);
+ void swap(QHostAddress &other) Q_DECL_NOTHROW { d.swap(other.d); }
+
void setAddress(quint32 ip4Addr);
void setAddress(quint8 *ip6Addr); // ### Qt 6: remove me
void setAddress(const quint8 *ip6Addr);