From a754c657db2d812911f278299c64001f37c2aae8 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Tue, 26 Oct 2010 17:53:43 +0200 Subject: QNAM HTTP: Remove unused code Reviewed-by: Prasanth Task-Number: QTBUG-13234 --- src/network/access/qhttpnetworkconnection.cpp | 15 --------------- src/network/access/qhttpnetworkconnection_p.h | 4 ---- src/network/access/qnetworkaccesshttpbackend.cpp | 23 ----------------------- 3 files changed, 42 deletions(-) diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index 1afca0b..bf02543 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -856,21 +856,6 @@ bool QHttpNetworkConnection::isEncrypted() const return d->encrypt; } -void QHttpNetworkConnection::setProxyAuthentication(QAuthenticator *authenticator) -{ - Q_D(QHttpNetworkConnection); - for (int i = 0; i < d->channelCount; ++i) - d->channels[i].proxyAuthenticator = *authenticator; -} - -void QHttpNetworkConnection::setAuthentication(const QString &domain, QAuthenticator *authenticator) -{ - Q_UNUSED(domain); // ### domain ? - Q_D(QHttpNetworkConnection); - for (int i = 0; i < d->channelCount; ++i) - d->channels[i].authenticator = *authenticator; -} - #ifndef QT_NO_NETWORKPROXY void QHttpNetworkConnection::setCacheProxy(const QNetworkProxy &networkProxy) { diff --git a/src/network/access/qhttpnetworkconnection_p.h b/src/network/access/qhttpnetworkconnection_p.h index 8d18a7c..f55937d 100644 --- a/src/network/access/qhttpnetworkconnection_p.h +++ b/src/network/access/qhttpnetworkconnection_p.h @@ -112,10 +112,6 @@ public: void enableEncryption(); bool isEncrypted() const; - //authentication parameters - void setProxyAuthentication(QAuthenticator *authenticator); - void setAuthentication(const QString &domain, QAuthenticator *authenticator); - #ifndef QT_NO_OPENSSL void setSslConfiguration(const QSslConfiguration &config); void ignoreSslErrors(int channel = -1); diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp index 3a854fe..ec10d34 100644 --- a/src/network/access/qnetworkaccesshttpbackend.cpp +++ b/src/network/access/qnetworkaccesshttpbackend.cpp @@ -878,29 +878,6 @@ void QNetworkAccessHttpBackend::httpError(QNetworkReply::NetworkError errorCode, #if defined(QNETWORKACCESSHTTPBACKEND_DEBUG) qDebug() << "http error!" << errorCode << errorString; #endif -#if 0 - static const QNetworkReply::NetworkError conversionTable[] = { - QNetworkReply::ConnectionRefusedError, - QNetworkReply::RemoteHostClosedError, - QNetworkReply::HostNotFoundError, - QNetworkReply::UnknownNetworkError, // SocketAccessError - QNetworkReply::UnknownNetworkError, // SocketResourceError - QNetworkReply::TimeoutError, // SocketTimeoutError - QNetworkReply::UnknownNetworkError, // DatagramTooLargeError - QNetworkReply::UnknownNetworkError, // NetworkError - QNetworkReply::UnknownNetworkError, // AddressInUseError - QNetworkReply::UnknownNetworkError, // SocketAddressNotAvailableError - QNetworkReply::UnknownNetworkError, // UnsupportedSocketOperationError - QNetworkReply::UnknownNetworkError, // UnfinishedSocketOperationError - QNetworkReply::ProxyAuthenticationRequiredError - }; - QNetworkReply::NetworkError code; - if (int(errorCode) >= 0 && - uint(errorCode) < (sizeof conversionTable / sizeof conversionTable[0])) - code = conversionTable[errorCode]; - else - code = QNetworkReply::UnknownNetworkError; -#endif error(errorCode, errorString); finished(); } -- cgit v0.12