Initialize error in QSslErrorPrivate

Axivion warning: "Compiler-generated constructor leaves some fields
uninitialized."

As the constructor of QSslError sets the error to QSslError::NoError
do the same in QSslErrorPrivate with NSDMI.

Task-number: QTBUG-125026
Pick-to: 6.7 6.5
Change-Id: I0db85dffb5eda3a6c768e326f87a01f8c176e4f1
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit bc34fe0e351d682584387dbfe5adee06ff59895c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Mate Barany 2024-07-22 14:12:30 +02:00 committed by Qt Cherry-pick Bot
parent 6e2c9dc7a6
commit d520bfe803

View File

@ -88,7 +88,7 @@ static_assert(sizeof(QScopedPointer<QSslErrorPrivate>) == sizeof(std::unique_ptr
class QSslErrorPrivate
{
public:
QSslError::SslError error;
QSslError::SslError error = QSslError::NoError;
QSslCertificate certificate;
};
@ -102,8 +102,6 @@ public:
QSslError::QSslError()
: d(new QSslErrorPrivate)
{
d->error = QSslError::NoError;
d->certificate = QSslCertificate();
}
/*!
@ -115,7 +113,6 @@ QSslError::QSslError(SslError error)
: d(new QSslErrorPrivate)
{
d->error = error;
d->certificate = QSslCertificate();
}
/*!