summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Knight <andrew.knight@digia.com>2014-04-28 11:26:29 +0300
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-29 12:01:29 +0200
commiteb211d74cc3dbf991093ad2e799370f006de8198 (patch)
treeb92d47f88be99aad90389de51f978ec1b055bda9
parent2d019ddc93c8139950c92ba09a3234f12462d024 (diff)
Add missing QT_NO_NETWORKPROXY guards around HTTP connect statements
Without these, a spew of connection warnings will occur when using HTTP on Qt builds with QT_NO_NETWORKPROXY. Change-Id: I330f6d98d1abdbadc57768dc48b8fab0ee1f6655 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
-rw-r--r--src/network/access/qhttpthreaddelegate.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/network/access/qhttpthreaddelegate.cpp b/src/network/access/qhttpthreaddelegate.cpp
index e03dcb8ead..76107d3110 100644
--- a/src/network/access/qhttpthreaddelegate.cpp
+++ b/src/network/access/qhttpthreaddelegate.cpp
@@ -352,8 +352,10 @@ void QHttpThreadDelegate::startRequest()
connect(httpReply, SIGNAL(authenticationRequired(QHttpNetworkRequest,QAuthenticator*)),
this, SLOT(synchronousAuthenticationRequiredSlot(QHttpNetworkRequest,QAuthenticator*)));
+#ifndef QT_NO_NETWORKPROXY
connect(httpReply, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
this, SLOT(synchronousProxyAuthenticationRequiredSlot(QNetworkProxy,QAuthenticator*)));
+#endif
// Don't care about ignored SSL errors for now in the synchronous HTTP case.
} else if (!synchronous) {
@@ -373,8 +375,10 @@ void QHttpThreadDelegate::startRequest()
// Connect the reply signals that we can directly forward
connect(httpReply, SIGNAL(authenticationRequired(QHttpNetworkRequest,QAuthenticator*)),
this, SIGNAL(authenticationRequired(QHttpNetworkRequest,QAuthenticator*)));
+#ifndef QT_NO_NETWORKPROXY
connect(httpReply, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
this, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
+#endif
}
connect(httpReply, SIGNAL(cacheCredentials(QHttpNetworkRequest,QAuthenticator*)),
@@ -706,9 +710,11 @@ void QHttpThreadDelegate::synchronousProxyAuthenticationRequiredSlot(const QNet
a->setPassword(credential.password);
}
+#ifndef QT_NO_NETWORKPROXY
// Disconnect this connection now since we only want to ask the authentication cache once.
QObject::disconnect(httpReply, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
this, SLOT(synchronousProxyAuthenticationRequiredSlot(QNetworkProxy,QAuthenticator*)));
+#endif
}
#endif