From eb211d74cc3dbf991093ad2e799370f006de8198 Mon Sep 17 00:00:00 2001 From: Andrew Knight Date: Mon, 28 Apr 2014 11:26:29 +0300 Subject: 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 Reviewed-by: Peter Hartmann --- src/network/access/qhttpthreaddelegate.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') 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 -- cgit v1.2.3