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/qnetworkinterface.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/network/kernel/qnetworkinterface.h') diff --git a/src/network/kernel/qnetworkinterface.h b/src/network/kernel/qnetworkinterface.h index a4d93156fb..31d3b7b128 100644 --- a/src/network/kernel/qnetworkinterface.h +++ b/src/network/kernel/qnetworkinterface.h @@ -51,10 +51,13 @@ class Q_NETWORK_EXPORT QNetworkAddressEntry public: QNetworkAddressEntry(); QNetworkAddressEntry(const QNetworkAddressEntry &other); +#ifdef Q_COMPILER_RVALUE_REFS + QNetworkAddressEntry &operator=(QNetworkAddressEntry &&other) Q_DECL_NOTHROW { swap(other); return *this; } +#endif QNetworkAddressEntry &operator=(const QNetworkAddressEntry &other); ~QNetworkAddressEntry(); - void swap(QNetworkAddressEntry &other) { qSwap(d, other.d); } + void swap(QNetworkAddressEntry &other) Q_DECL_NOTHROW { qSwap(d, other.d); } bool operator==(const QNetworkAddressEntry &other) const; inline bool operator!=(const QNetworkAddressEntry &other) const @@ -93,10 +96,13 @@ public: QNetworkInterface(); QNetworkInterface(const QNetworkInterface &other); +#ifdef Q_COMPILER_RVALUE_REFS + QNetworkInterface &operator=(QNetworkInterface &&other) Q_DECL_NOTHROW { swap(other); return *this; } +#endif QNetworkInterface &operator=(const QNetworkInterface &other); ~QNetworkInterface(); - void swap(QNetworkInterface &other) { qSwap(d, other.d); } + void swap(QNetworkInterface &other) Q_DECL_NOTHROW { qSwap(d, other.d); } bool isValid() const; -- cgit v1.2.3