summaryrefslogtreecommitdiffstats
path: root/src/network/access
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/access')
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp2
-rw-r--r--src/network/access/qhttpnetworkconnection_p.h2
-rw-r--r--src/network/access/qhttpnetworkreply_p.h1
-rw-r--r--src/network/access/qnetworkaccesshttpbackend.cpp11
-rw-r--r--src/network/access/qnetworkaccesshttpbackend_p.h2
5 files changed, 7 insertions, 11 deletions
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp
index f266322..1afca0b 100644
--- a/src/network/access/qhttpnetworkconnection.cpp
+++ b/src/network/access/qhttpnetworkconnection.cpp
@@ -351,7 +351,7 @@ bool QHttpNetworkConnectionPrivate::handleAuthenticateChallenge(QAbstractSocket
if (priv->phase == QAuthenticatorPrivate::Done) {
pauseConnection();
if (!isProxy) {
- emit q->authenticationRequired(reply, reply->request(), auth, q);
+ emit reply->authenticationRequired(reply->request(), auth);
#ifndef QT_NO_NETWORKPROXY
} else {
emit reply->proxyAuthenticationRequired(networkProxy, auth);
diff --git a/src/network/access/qhttpnetworkconnection_p.h b/src/network/access/qhttpnetworkconnection_p.h
index af33bf9..8d18a7c 100644
--- a/src/network/access/qhttpnetworkconnection_p.h
+++ b/src/network/access/qhttpnetworkconnection_p.h
@@ -123,8 +123,6 @@ public:
#endif
Q_SIGNALS:
- void authenticationRequired(const QHttpNetworkReply*, const QHttpNetworkRequest &request, QAuthenticator *authenticator,
- const QHttpNetworkConnection *connection = 0);
void error(QNetworkReply::NetworkError errorCode, const QString &detail = QString());
private:
diff --git a/src/network/access/qhttpnetworkreply_p.h b/src/network/access/qhttpnetworkreply_p.h
index b4a14f9..3f79d81 100644
--- a/src/network/access/qhttpnetworkreply_p.h
+++ b/src/network/access/qhttpnetworkreply_p.h
@@ -155,6 +155,7 @@ Q_SIGNALS:
#ifndef QT_NO_NETWORKPROXY
void proxyAuthenticationRequired(const QNetworkProxy &proxy, QAuthenticator *authenticator);
#endif
+ void authenticationRequired(const QHttpNetworkRequest &request, QAuthenticator *authenticator);
private:
Q_DECLARE_PRIVATE(QHttpNetworkReply)
friend class QHttpNetworkConnection;
diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp
index 3611e77..3a854fe 100644
--- a/src/network/access/qnetworkaccesshttpbackend.cpp
+++ b/src/network/access/qnetworkaccesshttpbackend.cpp
@@ -340,8 +340,6 @@ void QNetworkAccessHttpBackend::finished()
void QNetworkAccessHttpBackend::setupConnection()
{
- connect(http, SIGNAL(authenticationRequired(const QHttpNetworkReply*, QHttpNetworkRequest,QAuthenticator*,const QHttpNetworkConnection*)),
- SLOT(httpAuthenticationRequired(const QHttpNetworkReply*, QHttpNetworkRequest,QAuthenticator*)));
connect(http, SIGNAL(error(QNetworkReply::NetworkError,QString)),
SLOT(httpError(QNetworkReply::NetworkError,QString)));
}
@@ -598,6 +596,8 @@ void QNetworkAccessHttpBackend::postRequest()
connect(httpReply, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
#endif
+ connect(httpReply, SIGNAL(authenticationRequired(const QHttpNetworkRequest,QAuthenticator*)),
+ SLOT(httpAuthenticationRequired(const QHttpNetworkRequest,QAuthenticator*)));
}
void QNetworkAccessHttpBackend::invalidateCache()
@@ -860,13 +860,10 @@ void QNetworkAccessHttpBackend::replyHeaderChanged()
metaDataChanged();
}
-void QNetworkAccessHttpBackend::httpAuthenticationRequired(const QHttpNetworkReply *reply,
- const QHttpNetworkRequest &,
+void QNetworkAccessHttpBackend::httpAuthenticationRequired(const QHttpNetworkRequest &,
QAuthenticator *auth)
{
- // Only process this signal when it is for the QHttpNetworkReply that we actually have
- if (reply == this->httpReply)
- authenticationRequired(auth);
+ authenticationRequired(auth);
}
void QNetworkAccessHttpBackend::httpCacheCredentials(const QHttpNetworkRequest &,
diff --git a/src/network/access/qnetworkaccesshttpbackend_p.h b/src/network/access/qnetworkaccesshttpbackend_p.h
index f06f364..c4c88ae 100644
--- a/src/network/access/qnetworkaccesshttpbackend_p.h
+++ b/src/network/access/qnetworkaccesshttpbackend_p.h
@@ -104,7 +104,7 @@ private slots:
void replyReadyRead();
void replyFinished();
void replyHeaderChanged();
- void httpAuthenticationRequired(const QHttpNetworkReply*, const QHttpNetworkRequest &request, QAuthenticator *auth);
+ void httpAuthenticationRequired(const QHttpNetworkRequest &request, QAuthenticator *auth);
void httpCacheCredentials(const QHttpNetworkRequest &request, QAuthenticator *auth);
void httpError(QNetworkReply::NetworkError error, const QString &errorString);
bool sendCacheContents(const QNetworkCacheMetaData &metaData);