diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-06-25 18:41:14 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2015-06-30 10:57:50 +0000 |
commit | 65343eb28369823fd0c86384b488c3b7440d908a (patch) | |
tree | 5af5b7dad34eee5c15f605bace0f046805ba07c7 /src/network/access | |
parent | bc1804fa7247502b27a0501ec030e398a95bf367 (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/access')
-rw-r--r-- | src/network/access/qabstractnetworkcache.h | 5 | ||||
-rw-r--r-- | src/network/access/qhttpmultipart.h | 5 | ||||
-rw-r--r-- | src/network/access/qnetworkcookie.h | 5 | ||||
-rw-r--r-- | src/network/access/qnetworkrequest.h | 5 |
4 files changed, 16 insertions, 4 deletions
diff --git a/src/network/access/qabstractnetworkcache.h b/src/network/access/qabstractnetworkcache.h index 352daa9700..73f05176d4 100644 --- a/src/network/access/qabstractnetworkcache.h +++ b/src/network/access/qabstractnetworkcache.h @@ -60,9 +60,12 @@ public: QNetworkCacheMetaData(const QNetworkCacheMetaData &other); ~QNetworkCacheMetaData(); +#ifdef Q_COMPILER_RVALUE_REFS + QNetworkCacheMetaData &operator=(QNetworkCacheMetaData &&other) Q_DECL_NOTHROW { swap(other); return *this; } +#endif QNetworkCacheMetaData &operator=(const QNetworkCacheMetaData &other); - void swap(QNetworkCacheMetaData &other) + void swap(QNetworkCacheMetaData &other) Q_DECL_NOTHROW { qSwap(d, other.d); } bool operator==(const QNetworkCacheMetaData &other) const; diff --git a/src/network/access/qhttpmultipart.h b/src/network/access/qhttpmultipart.h index 2e08a3d6f8..dd8b733426 100644 --- a/src/network/access/qhttpmultipart.h +++ b/src/network/access/qhttpmultipart.h @@ -51,9 +51,12 @@ public: QHttpPart(); QHttpPart(const QHttpPart &other); ~QHttpPart(); +#ifdef Q_COMPILER_RVALUE_REFS + QHttpPart &operator=(QHttpPart &&other) Q_DECL_NOTHROW { swap(other); return *this; } +#endif QHttpPart &operator=(const QHttpPart &other); - void swap(QHttpPart &other) { qSwap(d, other.d); } + void swap(QHttpPart &other) Q_DECL_NOTHROW { qSwap(d, other.d); } bool operator==(const QHttpPart &other) const; inline bool operator!=(const QHttpPart &other) const diff --git a/src/network/access/qnetworkcookie.h b/src/network/access/qnetworkcookie.h index 2da86d3f81..27925c8201 100644 --- a/src/network/access/qnetworkcookie.h +++ b/src/network/access/qnetworkcookie.h @@ -59,9 +59,12 @@ public: explicit QNetworkCookie(const QByteArray &name = QByteArray(), const QByteArray &value = QByteArray()); QNetworkCookie(const QNetworkCookie &other); ~QNetworkCookie(); +#ifdef Q_COMPILER_RVALUE_REFS + QNetworkCookie &operator=(QNetworkCookie &&other) Q_DECL_NOTHROW { swap(other); return *this; } +#endif QNetworkCookie &operator=(const QNetworkCookie &other); - void swap(QNetworkCookie &other) { qSwap(d, other.d); } + void swap(QNetworkCookie &other) Q_DECL_NOTHROW { qSwap(d, other.d); } bool operator==(const QNetworkCookie &other) const; inline bool operator!=(const QNetworkCookie &other) const diff --git a/src/network/access/qnetworkrequest.h b/src/network/access/qnetworkrequest.h index c726db78cb..eb343c97df 100644 --- a/src/network/access/qnetworkrequest.h +++ b/src/network/access/qnetworkrequest.h @@ -106,9 +106,12 @@ public: explicit QNetworkRequest(const QUrl &url = QUrl()); QNetworkRequest(const QNetworkRequest &other); ~QNetworkRequest(); +#ifdef Q_COMPILER_RVALUE_REFS + QNetworkRequest &operator=(QNetworkRequest &&other) Q_DECL_NOTHROW { swap(other); return *this; } +#endif QNetworkRequest &operator=(const QNetworkRequest &other); - inline void swap(QNetworkRequest &other) { qSwap(d, other.d); } + void swap(QNetworkRequest &other) Q_DECL_NOTHROW { qSwap(d, other.d); } bool operator==(const QNetworkRequest &other) const; inline bool operator!=(const QNetworkRequest &other) const |