diff --git a/src/network/ssl/qsslerror.cpp b/src/network/ssl/qsslerror.cpp index 5e935adf09..6a4cef22ed 100644 --- a/src/network/ssl/qsslerror.cpp +++ b/src/network/ssl/qsslerror.cpp @@ -111,6 +111,11 @@ QT_BEGIN_NAMESPACE +#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) +// Avoid an ABI break due to the QScopedPointer->std::unique_ptr change +static_assert(sizeof(QScopedPointer) == sizeof(std::unique_ptr)); +#endif + class QSslErrorPrivate { public: @@ -163,7 +168,7 @@ QSslError::QSslError(SslError error, const QSslCertificate &certificate) QSslError::QSslError(const QSslError &other) : d(new QSslErrorPrivate) { - *d.data() = *other.d.data(); + *d.get() = *other.d.get(); } /*! @@ -180,7 +185,7 @@ QSslError::~QSslError() */ QSslError &QSslError::operator=(const QSslError &other) { - *d.data() = *other.d.data(); + *d.get() = *other.d.get(); return *this; } diff --git a/src/network/ssl/qsslerror.h b/src/network/ssl/qsslerror.h index f135dd10b7..a5865a5a33 100644 --- a/src/network/ssl/qsslerror.h +++ b/src/network/ssl/qsslerror.h @@ -45,6 +45,8 @@ #include #include +#include + QT_BEGIN_NAMESPACE @@ -120,7 +122,8 @@ public: QSslCertificate certificate() const; private: - QScopedPointer d; + // ### Qt 7: make QSslError implicitly shared + std::unique_ptr d; }; Q_DECLARE_SHARED(QSslError)