From 033ebfae211b5d6608f152f82beaca5cf445e0fc Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sun, 7 Aug 2016 09:33:11 +0300 Subject: QSslDiffieHellmanParameters: make fit for release - add missing \since 5.8 on free functions - fix \relates of qHash to point to QSslDHP, not QHash, which is in another module - API fix: use named instead of unnamed ctors - share code between ctors - API fix: add inline move ctor (for now, this requires using a naked d pointer, which isn't much of a problem, since the class is immutable). Change-Id: Ic30f9c3c03b8a3798e0676e38991ead85c587214 Reviewed-by: Timur Pocheptsov --- src/network/ssl/qssldiffiehellmanparameters.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/network/ssl/qssldiffiehellmanparameters.h') diff --git a/src/network/ssl/qssldiffiehellmanparameters.h b/src/network/ssl/qssldiffiehellmanparameters.h index aa40be83a6..4533ea4ed2 100644 --- a/src/network/ssl/qssldiffiehellmanparameters.h +++ b/src/network/ssl/qssldiffiehellmanparameters.h @@ -82,24 +82,25 @@ public: Q_NETWORK_EXPORT static QSslDiffieHellmanParameters defaultParameters(); Q_NETWORK_EXPORT QSslDiffieHellmanParameters(); - Q_NETWORK_EXPORT explicit QSslDiffieHellmanParameters(const QByteArray &encoded, QSsl::EncodingFormat format = QSsl::Pem); - Q_NETWORK_EXPORT explicit QSslDiffieHellmanParameters(QIODevice *device, QSsl::EncodingFormat format = QSsl::Pem); Q_NETWORK_EXPORT QSslDiffieHellmanParameters(const QSslDiffieHellmanParameters &other); + QSslDiffieHellmanParameters(QSslDiffieHellmanParameters &&other) Q_DECL_NOTHROW : d(other.d) { other.d = nullptr; } Q_NETWORK_EXPORT ~QSslDiffieHellmanParameters(); + Q_NETWORK_EXPORT QSslDiffieHellmanParameters &operator=(const QSslDiffieHellmanParameters &other); -#ifdef Q_COMPILER_RVALUE_REFS QSslDiffieHellmanParameters &operator=(QSslDiffieHellmanParameters &&other) Q_DECL_NOTHROW { swap(other); return *this; } -#endif void swap(QSslDiffieHellmanParameters &other) Q_DECL_NOTHROW { qSwap(d, other.d); } + Q_NETWORK_EXPORT static QSslDiffieHellmanParameters fromEncoded(const QByteArray &encoded, QSsl::EncodingFormat format = QSsl::Pem); + Q_NETWORK_EXPORT static QSslDiffieHellmanParameters fromEncoded(QIODevice *device, QSsl::EncodingFormat format = QSsl::Pem); + Q_NETWORK_EXPORT bool isEmpty() const Q_DECL_NOTHROW; Q_NETWORK_EXPORT bool isValid() const Q_DECL_NOTHROW; - Q_NETWORK_EXPORT QSslDiffieHellmanParameters::Error error() const Q_DECL_NOTHROW; + Q_NETWORK_EXPORT Error error() const Q_DECL_NOTHROW; Q_NETWORK_EXPORT QString errorString() const Q_DECL_NOTHROW; private: - QExplicitlySharedDataPointer d; + QSslDiffieHellmanParametersPrivate *d; friend class QSslContext; friend Q_NETWORK_EXPORT bool operator==(const QSslDiffieHellmanParameters &lhs, const QSslDiffieHellmanParameters &rhs) Q_DECL_NOTHROW; #ifndef QT_NO_DEBUG_STREAM -- cgit v1.2.3