summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2010-10-26 13:29:44 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2010-10-27 12:40:28 (GMT)
commit300523dfba881e5464da24cf6106890f3c803cd0 (patch)
tree0bd59adda50824bcfa43c85da6279393a08025e6 /src/network
parent6765569901a12fc70be2c1921d79b377898df9ae (diff)
downloadQt-300523dfba881e5464da24cf6106890f3c803cd0.zip
Qt-300523dfba881e5464da24cf6106890f3c803cd0.tar.gz
Qt-300523dfba881e5464da24cf6106890f3c803cd0.tar.bz2
QNAM HTTP: Use sslErrors() from QHttpNetworkReply
Reviewed-by: Prasanth Task-Number: QTBUG-13234
Diffstat (limited to 'src/network')
-rw-r--r--src/network/access/qhttpnetworkconnection_p.h3
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp2
-rw-r--r--src/network/access/qhttpnetworkreply.cpp5
-rw-r--r--src/network/access/qhttpnetworkreply_p.h2
-rw-r--r--src/network/access/qnetworkaccesshttpbackend.cpp6
5 files changed, 10 insertions, 8 deletions
diff --git a/src/network/access/qhttpnetworkconnection_p.h b/src/network/access/qhttpnetworkconnection_p.h
index 875c978..e20c795 100644
--- a/src/network/access/qhttpnetworkconnection_p.h
+++ b/src/network/access/qhttpnetworkconnection_p.h
@@ -120,9 +120,6 @@ public:
void setSslConfiguration(const QSslConfiguration &config);
void ignoreSslErrors(int channel = -1);
void ignoreSslErrors(const QList<QSslError> &errors, int channel = -1);
-
-Q_SIGNALS:
- void sslErrors(const QList<QSslError> &errors);
#endif
Q_SIGNALS:
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
index 329b0b2..9c504ba 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -1037,7 +1037,7 @@ void QHttpNetworkConnectionChannel::_q_sslErrors(const QList<QSslError> &errors)
// Also pause the connection because socket notifiers may fire while an user
// dialog is displaying
connection->d_func()->pauseConnection();
- emit connection->sslErrors(errors);
+ emit reply->sslErrors(errors);
connection->d_func()->resumeConnection();
}
diff --git a/src/network/access/qhttpnetworkreply.cpp b/src/network/access/qhttpnetworkreply.cpp
index 108ba8a..e4eb7c4 100644
--- a/src/network/access/qhttpnetworkreply.cpp
+++ b/src/network/access/qhttpnetworkreply.cpp
@@ -205,6 +205,11 @@ bool QHttpNetworkReply::isPipeliningUsed() const
return d_func()->pipeliningUsed;
}
+QHttpNetworkConnection* QHttpNetworkReply::connection()
+{
+ return d_func()->connection;
+}
+
QHttpNetworkReplyPrivate::QHttpNetworkReplyPrivate(const QUrl &newUrl)
: QHttpNetworkHeaderPrivate(newUrl), state(NothingDoneState), statusCode(100),
diff --git a/src/network/access/qhttpnetworkreply_p.h b/src/network/access/qhttpnetworkreply_p.h
index 4011c78..7cfd8b2 100644
--- a/src/network/access/qhttpnetworkreply_p.h
+++ b/src/network/access/qhttpnetworkreply_p.h
@@ -132,6 +132,8 @@ public:
bool isPipeliningUsed() const;
+ QHttpNetworkConnection* connection();
+
#ifndef QT_NO_OPENSSL
QSslConfiguration sslConfiguration() const;
void setSslConfiguration(const QSslConfiguration &config);
diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp
index 2af4987..c425600 100644
--- a/src/network/access/qnetworkaccesshttpbackend.cpp
+++ b/src/network/access/qnetworkaccesshttpbackend.cpp
@@ -350,10 +350,6 @@ void QNetworkAccessHttpBackend::setupConnection()
SLOT(httpCacheCredentials(QHttpNetworkRequest,QAuthenticator*)));
connect(http, SIGNAL(error(QNetworkReply::NetworkError,QString)),
SLOT(httpError(QNetworkReply::NetworkError,QString)));
-#ifndef QT_NO_OPENSSL
- connect(http, SIGNAL(sslErrors(QList<QSslError>)),
- SLOT(sslErrors(QList<QSslError>)));
-#endif
}
/*
@@ -593,6 +589,8 @@ void QNetworkAccessHttpBackend::postRequest()
if (pendingIgnoreAllSslErrors)
httpReply->ignoreSslErrors();
httpReply->ignoreSslErrors(pendingIgnoreSslErrorsList);
+ connect(httpReply, SIGNAL(sslErrors(QList<QSslError>)),
+ SLOT(sslErrors(QList<QSslError>)));
#endif
connect(httpReply, SIGNAL(readyRead()), SLOT(replyReadyRead()));