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/ssl | |
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/ssl')
-rw-r--r-- | src/network/ssl/qsslcertificate.h | 5 | ||||
-rw-r--r-- | src/network/ssl/qsslcertificateextension.h | 8 | ||||
-rw-r--r-- | src/network/ssl/qsslcipher.h | 7 | ||||
-rw-r--r-- | src/network/ssl/qsslconfiguration.h | 5 | ||||
-rw-r--r-- | src/network/ssl/qsslerror.h | 5 | ||||
-rw-r--r-- | src/network/ssl/qsslkey.h | 7 | ||||
-rw-r--r-- | src/network/ssl/qsslpresharedkeyauthenticator.h | 8 |
7 files changed, 29 insertions, 16 deletions
diff --git a/src/network/ssl/qsslcertificate.h b/src/network/ssl/qsslcertificate.h index ef0767ae8f..bd8dcb6c7f 100644 --- a/src/network/ssl/qsslcertificate.h +++ b/src/network/ssl/qsslcertificate.h @@ -83,9 +83,12 @@ public: explicit QSslCertificate(const QByteArray &data = QByteArray(), QSsl::EncodingFormat format = QSsl::Pem); QSslCertificate(const QSslCertificate &other); ~QSslCertificate(); +#ifdef Q_COMPILER_RVALUE_REFS + QSslCertificate &operator=(QSslCertificate &&other) Q_DECL_NOTHROW { swap(other); return *this; } +#endif QSslCertificate &operator=(const QSslCertificate &other); - inline void swap(QSslCertificate &other) + void swap(QSslCertificate &other) Q_DECL_NOTHROW { qSwap(d, other.d); } bool operator==(const QSslCertificate &other) const; diff --git a/src/network/ssl/qsslcertificateextension.h b/src/network/ssl/qsslcertificateextension.h index 7c958eff30..8dd0e8eb4b 100644 --- a/src/network/ssl/qsslcertificateextension.h +++ b/src/network/ssl/qsslcertificateextension.h @@ -51,11 +51,13 @@ class Q_NETWORK_EXPORT QSslCertificateExtension public: QSslCertificateExtension(); QSslCertificateExtension(const QSslCertificateExtension &other); - ~QSslCertificateExtension(); - +#ifdef Q_COMPILER_RVALUE_REFS + QSslCertificateExtension &operator=(QSslCertificateExtension &&other) Q_DECL_NOTHROW { swap(other); return *this; } +#endif QSslCertificateExtension &operator=(const QSslCertificateExtension &other); + ~QSslCertificateExtension(); - void swap(QSslCertificateExtension &other) { qSwap(d, other.d); } + void swap(QSslCertificateExtension &other) Q_DECL_NOTHROW { qSwap(d, other.d); } QString oid() const; QString name() const; diff --git a/src/network/ssl/qsslcipher.h b/src/network/ssl/qsslcipher.h index dc65e32111..64122cdd53 100644 --- a/src/network/ssl/qsslcipher.h +++ b/src/network/ssl/qsslcipher.h @@ -52,10 +52,13 @@ public: explicit QSslCipher(const QString &name); QSslCipher(const QString &name, QSsl::SslProtocol protocol); QSslCipher(const QSslCipher &other); - ~QSslCipher(); +#ifdef Q_COMPILER_RVALUE_REFS + QSslCipher &operator=(QSslCipher &&other) Q_DECL_NOTHROW { swap(other); return *this; } +#endif QSslCipher &operator=(const QSslCipher &other); + ~QSslCipher(); - inline void swap(QSslCipher &other) + void swap(QSslCipher &other) Q_DECL_NOTHROW { qSwap(d, other.d); } bool operator==(const QSslCipher &other) const; diff --git a/src/network/ssl/qsslconfiguration.h b/src/network/ssl/qsslconfiguration.h index c5a1c6e6d4..8d7378f8ea 100644 --- a/src/network/ssl/qsslconfiguration.h +++ b/src/network/ssl/qsslconfiguration.h @@ -71,9 +71,12 @@ public: QSslConfiguration(); QSslConfiguration(const QSslConfiguration &other); ~QSslConfiguration(); +#ifdef Q_COMPILER_RVALUE_REFS + QSslConfiguration &operator=(QSslConfiguration &&other) Q_DECL_NOTHROW { swap(other); return *this; } +#endif QSslConfiguration &operator=(const QSslConfiguration &other); - inline void swap(QSslConfiguration &other) + void swap(QSslConfiguration &other) Q_DECL_NOTHROW { qSwap(d, other.d); } bool operator==(const QSslConfiguration &other) const; diff --git a/src/network/ssl/qsslerror.h b/src/network/ssl/qsslerror.h index b149f86d9e..bc2a2d5220 100644 --- a/src/network/ssl/qsslerror.h +++ b/src/network/ssl/qsslerror.h @@ -84,10 +84,13 @@ public: QSslError(const QSslError &other); - inline void swap(QSslError &other) + void swap(QSslError &other) Q_DECL_NOTHROW { qSwap(d, other.d); } ~QSslError(); +#ifdef Q_COMPILER_RVALUE_REFS + QSslError &operator=(QSslError &&other) Q_DECL_NOTHROW { swap(other); return *this; } +#endif QSslError &operator=(const QSslError &other); bool operator==(const QSslError &other) const; inline bool operator!=(const QSslError &other) const diff --git a/src/network/ssl/qsslkey.h b/src/network/ssl/qsslkey.h index b89069e4cb..d02c031015 100644 --- a/src/network/ssl/qsslkey.h +++ b/src/network/ssl/qsslkey.h @@ -64,10 +64,13 @@ public: const QByteArray &passPhrase = QByteArray()); explicit QSslKey(Qt::HANDLE handle, QSsl::KeyType type = QSsl::PrivateKey); QSslKey(const QSslKey &other); - ~QSslKey(); +#ifdef Q_COMPILER_RVALUE_REFS + QSslKey &operator=(QSslKey &&other) Q_DECL_NOTHROW { swap(other); return *this; } +#endif QSslKey &operator=(const QSslKey &other); + ~QSslKey(); - inline void swap(QSslKey &other) { qSwap(d, other.d); } + void swap(QSslKey &other) Q_DECL_NOTHROW { qSwap(d, other.d); } bool isNull() const; void clear(); diff --git a/src/network/ssl/qsslpresharedkeyauthenticator.h b/src/network/ssl/qsslpresharedkeyauthenticator.h index 52301ef7e5..d5b9b34f28 100644 --- a/src/network/ssl/qsslpresharedkeyauthenticator.h +++ b/src/network/ssl/qsslpresharedkeyauthenticator.h @@ -52,14 +52,10 @@ public: QSslPreSharedKeyAuthenticator &operator=(const QSslPreSharedKeyAuthenticator &authenticator); #ifdef Q_COMPILER_RVALUE_REFS - inline QSslPreSharedKeyAuthenticator &operator=(QSslPreSharedKeyAuthenticator &&authenticator) - { d.swap(authenticator.d); return *this; } + QSslPreSharedKeyAuthenticator &operator=(QSslPreSharedKeyAuthenticator &&other) Q_DECL_NOTHROW { swap(other); return *this; } #endif - void swap(QSslPreSharedKeyAuthenticator &authenticator) - { - d.swap(authenticator.d); - } + void swap(QSslPreSharedKeyAuthenticator &other) Q_DECL_NOTHROW { qSwap(d, other.d); } QByteArray identityHint() const; |