diff options
author | Markus Goetz <Markus.Goetz@nokia.com> | 2010-10-26 13:29:44 (GMT) |
---|---|---|
committer | Markus Goetz <Markus.Goetz@nokia.com> | 2010-10-27 12:40:28 (GMT) |
commit | 300523dfba881e5464da24cf6106890f3c803cd0 (patch) | |
tree | 0bd59adda50824bcfa43c85da6279393a08025e6 /tests | |
parent | 6765569901a12fc70be2c1921d79b377898df9ae (diff) | |
download | Qt-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 'tests')
-rw-r--r-- | tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp b/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp index c0f503b..ecfd462 100644 --- a/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp +++ b/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp @@ -668,8 +668,10 @@ void tst_QHttpNetworkConnection::sslErrors(const QList<QSslError> &errors) { Q_UNUSED(errors) - QHttpNetworkConnection *connection = qobject_cast<QHttpNetworkConnection*>(sender()); - if (connection) { + QHttpNetworkReply *reply = qobject_cast<QHttpNetworkReply*>(sender()); + if (reply) { + QHttpNetworkConnection *connection = reply->connection(); + QVariant val = connection->property("ignoreFromSignal"); if (val.toBool()) connection->ignoreSslErrors(); @@ -716,12 +718,12 @@ void tst_QHttpNetworkConnection::ignoresslerror() if (ignoreInit) connection.ignoreSslErrors(); QCOMPARE(connection.isEncrypted(), encrypt); - connect(&connection, SIGNAL(sslErrors(const QList<QSslError>&)), - SLOT(sslErrors(const QList<QSslError>&))); connection.setProperty("ignoreFromSignal", ignoreFromSignal); QHttpNetworkRequest request(protocol + host + path); QHttpNetworkReply *reply = connection.sendRequest(request); + connect(reply, SIGNAL(sslErrors(const QList<QSslError>&)), + SLOT(sslErrors(const QList<QSslError>&))); finishedWithErrorCalled = false; |