Respect the application and system configuration settings for the proxy

If an application proxy has been set or the usage of the system proxy
configuration has been turned off then these should be respected rather
than querying the system for the proxy. By using proxyForQuery() over
systemProxyForQuery() it ensures that it first checks if there is an
application proxy set before falling back to the system proxy, if using
the system proxy has not been turned off.

Task-number: QTBUG-61692
Change-Id: I65ed3e6bd7b3449cd4ae3757e583aa8d7724221b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
bb10
Andy Shaw 2017-06-29 12:19:27 +02:00 committed by Timur Pocheptsov
parent b2ec7317c8
commit d0c5e29432
1 changed files with 1 additions and 1 deletions

View File

@ -395,7 +395,7 @@ bool QNativeSocketEnginePrivate::checkProxy(const QHostAddress &address)
// QNetworkProxyQuery).
QNetworkProxyQuery query;
query.setQueryType(queryType);
proxy = QNetworkProxyFactory::systemProxyForQuery(query).constFirst();
proxy = QNetworkProxyFactory::proxyForQuery(query).constFirst();
}
if (proxy.type() != QNetworkProxy::DefaultProxy &&