diff options
author | Markus Goetz <Markus.Goetz@nokia.com> | 2010-10-19 14:19:29 (GMT) |
---|---|---|
committer | Markus Goetz <Markus.Goetz@nokia.com> | 2010-10-27 12:40:27 (GMT) |
commit | 04cc5144a8d1d1eb51fb627327e155649ba2ce45 (patch) | |
tree | 1ed5a32ae0f76898ae942ee73b24ec362e05af1d /tests/auto | |
parent | 07fd031d29198cc5a0d6f1da6bb8fea29274fa06 (diff) | |
download | Qt-04cc5144a8d1d1eb51fb627327e155649ba2ce45.zip Qt-04cc5144a8d1d1eb51fb627327e155649ba2ce45.tar.gz Qt-04cc5144a8d1d1eb51fb627327e155649ba2ce45.tar.bz2 |
QNAM HTTP: Process authenticationRequired() from HTTP properly
Fixes a bug where a different QNetworkReply(Impl) handles an
authentication request.
Reviewed-by: Peter Hartmann
Reviewed-by: Prasanth
Task-Number: QTBUG-13234
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp b/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp index 89f608e..c0f503b 100644 --- a/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp +++ b/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp @@ -57,7 +57,7 @@ public: public Q_SLOTS: void finishedReply(); void finishedWithError(QNetworkReply::NetworkError errorCode, const QString &detail); - void challenge401(const QHttpNetworkRequest &request, QAuthenticator *authenticator, const QHttpNetworkConnection *connection); + void challenge401(const QHttpNetworkReply*, const QHttpNetworkRequest &request, QAuthenticator *authenticator, const QHttpNetworkConnection *connection); #ifndef QT_NO_OPENSSL void sslErrors(const QList<QSslError> &errors); #endif @@ -495,7 +495,7 @@ void tst_QHttpNetworkConnection::_connect() QVERIFY(false); } -void tst_QHttpNetworkConnection::challenge401(const QHttpNetworkRequest &request, +void tst_QHttpNetworkConnection::challenge401(const QHttpNetworkReply*, const QHttpNetworkRequest &request, QAuthenticator *authenticator, const QHttpNetworkConnection *connection) { @@ -552,8 +552,8 @@ void tst_QHttpNetworkConnection::get401() if (encrypt) connection.enableEncryption(); QCOMPARE(connection.isEncrypted(), encrypt); - connect(&connection, SIGNAL(authenticationRequired(const QHttpNetworkRequest&, QAuthenticator *, const QHttpNetworkConnection*)), - SLOT(challenge401(const QHttpNetworkRequest&, QAuthenticator *, const QHttpNetworkConnection*))); + connect(&connection, SIGNAL(authenticationRequired(const QHttpNetworkReply*, const QHttpNetworkRequest&, QAuthenticator *, const QHttpNetworkConnection*)), + SLOT(challenge401(const QHttpNetworkReply*, const QHttpNetworkRequest&, QAuthenticator *, const QHttpNetworkConnection*))); connection.setProperty("setCredentials", setCredentials); connection.setProperty("username", username); connection.setProperty("password", password); |