From 65343eb28369823fd0c86384b488c3b7440d908a Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 25 Jun 2015 18:41:14 +0200 Subject: QtNetwork: make all Q_DECLARE_SHARED types nothrow move-assignable Change-Id: Ib29ec4b73a4cdc51074997f7d167c289cf5af7a4 Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/network/kernel/qhostaddress.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/network/kernel/qhostaddress.h') 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); -- cgit v1.2.3