diff options
author | Markus Goetz <Markus.Goetz@nokia.com> | 2010-10-26 16:02:10 (GMT) |
---|---|---|
committer | Markus Goetz <Markus.Goetz@nokia.com> | 2010-10-27 12:40:29 (GMT) |
commit | be18016694c57fef508aa4715f5b8f9bbf21e5ac (patch) | |
tree | 56393efdb9b39d3181c3213bc5639f75050ee328 | |
parent | a754c657db2d812911f278299c64001f37c2aae8 (diff) | |
download | Qt-be18016694c57fef508aa4715f5b8f9bbf21e5ac.zip Qt-be18016694c57fef508aa4715f5b8f9bbf21e5ac.tar.gz Qt-be18016694c57fef508aa4715f5b8f9bbf21e5ac.tar.bz2 |
QNAM HTTP: Remove enableEncryption()
Reviewed-by: Prasanth
Task-Number: QTBUG-13234
-rw-r--r-- | src/network/access/qhttpnetworkconnection.cpp | 6 | ||||
-rw-r--r-- | src/network/access/qhttpnetworkconnection_p.h | 2 | ||||
-rw-r--r-- | tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp | 26 |
3 files changed, 5 insertions, 29 deletions
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index bf02543..3acaaff 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -844,12 +844,6 @@ QHttpNetworkReply* QHttpNetworkConnection::sendRequest(const QHttpNetworkRequest return d->queueRequest(request); } -void QHttpNetworkConnection::enableEncryption() -{ - Q_D(QHttpNetworkConnection); - d->encrypt = true; -} - bool QHttpNetworkConnection::isEncrypted() const { Q_D(const QHttpNetworkConnection); diff --git a/src/network/access/qhttpnetworkconnection_p.h b/src/network/access/qhttpnetworkconnection_p.h index f55937d..5d5caa6 100644 --- a/src/network/access/qhttpnetworkconnection_p.h +++ b/src/network/access/qhttpnetworkconnection_p.h @@ -108,8 +108,6 @@ public: QNetworkProxy transparentProxy() const; #endif - //enable encryption - void enableEncryption(); bool isEncrypted() const; #ifndef QT_NO_OPENSSL diff --git a/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp b/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp index 0956b57..29fe2fb 100644 --- a/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp +++ b/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp @@ -175,11 +175,9 @@ void tst_QHttpNetworkConnection::head() QFETCH(QString, statusString); QFETCH(int, contentLength); - QHttpNetworkConnection connection(host); + QHttpNetworkConnection connection(host, port, encrypt); QCOMPARE(connection.port(), port); QCOMPARE(connection.hostName(), host); - if (encrypt) - connection.enableEncryption(); QCOMPARE(connection.isEncrypted(), encrypt); QHttpNetworkRequest request(protocol + host + path, QHttpNetworkRequest::Head); @@ -235,11 +233,9 @@ void tst_QHttpNetworkConnection::get() QFETCH(int, contentLength); QFETCH(int, downloadSize); - QHttpNetworkConnection connection(host); + QHttpNetworkConnection connection(host, port, encrypt); QCOMPARE(connection.port(), port); QCOMPARE(connection.hostName(), host); - if (encrypt) - connection.enableEncryption(); QCOMPARE(connection.isEncrypted(), encrypt); QHttpNetworkRequest request(protocol + host + path); @@ -315,11 +311,9 @@ void tst_QHttpNetworkConnection::put() QFETCH(QString, data); QFETCH(bool, succeed); - QHttpNetworkConnection connection(host); + QHttpNetworkConnection connection(host, port, encrypt); QCOMPARE(connection.port(), port); QCOMPARE(connection.hostName(), host); - if (encrypt) - connection.enableEncryption(); QCOMPARE(connection.isEncrypted(), encrypt); QHttpNetworkRequest request(protocol + host + path, QHttpNetworkRequest::Put); @@ -407,11 +401,9 @@ void tst_QHttpNetworkConnection::post() QFETCH(int, contentLength); QFETCH(int, downloadSize); - QHttpNetworkConnection connection(host); + QHttpNetworkConnection connection(host, port, encrypt); QCOMPARE(connection.port(), port); QCOMPARE(connection.hostName(), host); - if (encrypt) - connection.enableEncryption(); QCOMPARE(connection.isEncrypted(), encrypt); QHttpNetworkRequest request(protocol + host + path, QHttpNetworkRequest::Post); @@ -549,8 +541,6 @@ void tst_QHttpNetworkConnection::get401() QHttpNetworkConnection connection(host, port, encrypt); QCOMPARE(connection.port(), port); QCOMPARE(connection.hostName(), host); - if (encrypt) - connection.enableEncryption(); QCOMPARE(connection.isEncrypted(), encrypt); connection.setProperty("setCredentials", setCredentials); connection.setProperty("username", username); @@ -618,11 +608,9 @@ void tst_QHttpNetworkConnection::compression() QFETCH(bool, autoCompress); QFETCH(QString, contentCoding); - QHttpNetworkConnection connection(host); + QHttpNetworkConnection connection(host, port, encrypt); QCOMPARE(connection.port(), port); QCOMPARE(connection.hostName(), host); - if (encrypt) - connection.enableEncryption(); QCOMPARE(connection.isEncrypted(), encrypt); QHttpNetworkRequest request(protocol + host + path); @@ -713,8 +701,6 @@ void tst_QHttpNetworkConnection::ignoresslerror() QHttpNetworkConnection connection(host, port, encrypt); QCOMPARE(connection.port(), port); QCOMPARE(connection.hostName(), host); - if (encrypt) - connection.enableEncryption(); if (ignoreInit) connection.ignoreSslErrors(); QCOMPARE(connection.isEncrypted(), encrypt); @@ -771,8 +757,6 @@ void tst_QHttpNetworkConnection::nossl() QHttpNetworkConnection connection(host, port, encrypt); QCOMPARE(connection.port(), port); QCOMPARE(connection.hostName(), host); - if (encrypt) - connection.enableEncryption(); QHttpNetworkRequest request(protocol + host + path); QHttpNetworkReply *reply = connection.sendRequest(request); |