QNetworkReply: Fix SSL configuration handling
Use QT_CONFIG consistently and enclose sslConfigurationImplementation(), setSslConfigurationImplementation() and ignoreSslErrorsImplementation() within QT_CONFIG as well. This enables a build of Qt for Python with -no-feature-ssl. Fixes: PYSIDE-1302 Change-Id: Ia699293ab73a5dc86d8dcf95aa5f6369334d36a2 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 5436a6f3e0a9e7ef7ed51fc5b304e1f81eaed960)
This commit is contained in:
parent
8e3b83ad55
commit
36c55eb7eb
@ -687,7 +687,7 @@ QVariant QNetworkReply::attribute(QNetworkRequest::Attribute code) const
|
||||
return d_func()->attributes.value(code);
|
||||
}
|
||||
|
||||
#ifndef QT_NO_SSL
|
||||
#if QT_CONFIG(ssl)
|
||||
/*!
|
||||
Returns the SSL configuration and state associated with this
|
||||
reply, if SSL was used. It will contain the remote server's
|
||||
@ -742,7 +742,6 @@ void QNetworkReply::ignoreSslErrors(const QList<QSslError> &errors)
|
||||
{
|
||||
ignoreSslErrorsImplementation(errors);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*!
|
||||
\fn void QNetworkReply::sslConfigurationImplementation(QSslConfiguration &configuration) const
|
||||
@ -786,6 +785,8 @@ void QNetworkReply::ignoreSslErrorsImplementation(const QList<QSslError> &)
|
||||
{
|
||||
}
|
||||
|
||||
#endif // QT_CONFIG(ssl)
|
||||
|
||||
/*!
|
||||
If this function is called, SSL errors related to network
|
||||
connection will be ignored, including certificate validation
|
||||
|
@ -143,7 +143,7 @@ public:
|
||||
// attributes
|
||||
QVariant attribute(QNetworkRequest::Attribute code) const;
|
||||
|
||||
#ifndef QT_NO_SSL
|
||||
#if QT_CONFIG(ssl)
|
||||
QSslConfiguration sslConfiguration() const;
|
||||
void setSslConfiguration(const QSslConfiguration &configuration);
|
||||
void ignoreSslErrors(const QList<QSslError> &errors);
|
||||
@ -157,7 +157,7 @@ Q_SIGNALS:
|
||||
void metaDataChanged();
|
||||
void finished();
|
||||
void error(QNetworkReply::NetworkError);
|
||||
#ifndef QT_NO_SSL
|
||||
#if QT_CONFIG(ssl)
|
||||
void encrypted();
|
||||
void sslErrors(const QList<QSslError> &errors);
|
||||
void preSharedKeyAuthenticationRequired(QSslPreSharedKeyAuthenticator *authenticator);
|
||||
@ -182,9 +182,11 @@ protected:
|
||||
void setRawHeader(const QByteArray &headerName, const QByteArray &value);
|
||||
void setAttribute(QNetworkRequest::Attribute code, const QVariant &value);
|
||||
|
||||
#if QT_CONFIG(ssl)
|
||||
virtual void sslConfigurationImplementation(QSslConfiguration &) const;
|
||||
virtual void setSslConfigurationImplementation(const QSslConfiguration &);
|
||||
virtual void ignoreSslErrorsImplementation(const QList<QSslError> &);
|
||||
#endif
|
||||
|
||||
private:
|
||||
Q_DECLARE_PRIVATE(QNetworkReply)
|
||||
|
Loading…
x
Reference in New Issue
Block a user