summaryrefslogtreecommitdiffstats
path: root/src/network/access
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2010-10-26 13:35:10 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2010-10-27 12:40:28 (GMT)
commit3b87e4639edb2c7050c5ae74fa8280fd120b8de1 (patch)
treefd88f5df877a9f05fbadbe1397a6daa4913f2b5c /src/network/access
parent300523dfba881e5464da24cf6106890f3c803cd0 (diff)
downloadQt-3b87e4639edb2c7050c5ae74fa8280fd120b8de1.zip
Qt-3b87e4639edb2c7050c5ae74fa8280fd120b8de1.tar.gz
Qt-3b87e4639edb2c7050c5ae74fa8280fd120b8de1.tar.bz2
QNAM HTTP: Move cacheCredentials() to QHttpNetworkReply
Reviewed-by: Prasanth Task-Number: QTBUG-13234
Diffstat (limited to 'src/network/access')
-rw-r--r--src/network/access/qhttpnetworkconnection_p.h2
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp2
-rw-r--r--src/network/access/qhttpnetworkreply_p.h1
-rw-r--r--src/network/access/qnetworkaccesshttpbackend.cpp4
4 files changed, 4 insertions, 5 deletions
diff --git a/src/network/access/qhttpnetworkconnection_p.h b/src/network/access/qhttpnetworkconnection_p.h
index e20c795..f8c4bb4 100644
--- a/src/network/access/qhttpnetworkconnection_p.h
+++ b/src/network/access/qhttpnetworkconnection_p.h
@@ -130,8 +130,6 @@ Q_SIGNALS:
#endif
void authenticationRequired(const QHttpNetworkReply*, const QHttpNetworkRequest &request, QAuthenticator *authenticator,
const QHttpNetworkConnection *connection = 0);
- void cacheCredentials(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/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
index 9c504ba..52a8e72 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -190,7 +190,7 @@ bool QHttpNetworkConnectionChannel::sendRequest()
|| (!url.password().isEmpty() && url.password() != auth.password())) {
auth.setUser(url.userName());
auth.setPassword(url.password());
- emit connection->cacheCredentials(request, &auth, connection);
+ emit reply->cacheCredentials(request, &auth);
connection->d_func()->copyCredentials(connection->d_func()->indexOf(socket), &auth, false);
}
// clear the userinfo, since we use the same request for resending
diff --git a/src/network/access/qhttpnetworkreply_p.h b/src/network/access/qhttpnetworkreply_p.h
index 7cfd8b2..79966fd 100644
--- a/src/network/access/qhttpnetworkreply_p.h
+++ b/src/network/access/qhttpnetworkreply_p.h
@@ -151,6 +151,7 @@ Q_SIGNALS:
void headerChanged();
void dataReadProgress(int done, int total);
void dataSendProgress(qint64 done, qint64 total);
+ void cacheCredentials(const QHttpNetworkRequest &request, QAuthenticator *authenticator);
private:
Q_DECLARE_PRIVATE(QHttpNetworkReply)
diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp
index c425600..3bad2fe 100644
--- a/src/network/access/qnetworkaccesshttpbackend.cpp
+++ b/src/network/access/qnetworkaccesshttpbackend.cpp
@@ -346,8 +346,6 @@ void QNetworkAccessHttpBackend::setupConnection()
#endif
connect(http, SIGNAL(authenticationRequired(const QHttpNetworkReply*, QHttpNetworkRequest,QAuthenticator*,const QHttpNetworkConnection*)),
SLOT(httpAuthenticationRequired(const QHttpNetworkReply*, QHttpNetworkRequest,QAuthenticator*)));
- connect(http, SIGNAL(cacheCredentials(QHttpNetworkRequest,QAuthenticator*)),
- SLOT(httpCacheCredentials(QHttpNetworkRequest,QAuthenticator*)));
connect(http, SIGNAL(error(QNetworkReply::NetworkError,QString)),
SLOT(httpError(QNetworkReply::NetworkError,QString)));
}
@@ -598,6 +596,8 @@ void QNetworkAccessHttpBackend::postRequest()
connect(httpReply, SIGNAL(finishedWithError(QNetworkReply::NetworkError,QString)),
SLOT(httpError(QNetworkReply::NetworkError,QString)));
connect(httpReply, SIGNAL(headerChanged()), SLOT(replyHeaderChanged()));
+ connect(httpReply, SIGNAL(cacheCredentials(QHttpNetworkRequest,QAuthenticator*)),
+ SLOT(httpCacheCredentials(QHttpNetworkRequest,QAuthenticator*)));
}
void QNetworkAccessHttpBackend::invalidateCache()