diff options
author | Kai Koehne <kai.koehne@qt.io> | 2016-11-04 16:36:44 +0100 |
---|---|---|
committer | Kai Koehne <kai.koehne@qt.io> | 2016-11-09 09:11:50 +0000 |
commit | bf6cffde943293674a063feda56f4564dd07414b (patch) | |
tree | 4bb8ef92c01ca344ab19e42a8da83b238b56e41a | |
parent | 95da2313197aafc06cc6cb3ab730e8d036fb2895 (diff) |
Only use system proxy if QNetworkProxy::useSystemConfiguration() says so
This allows users to disable _any_ proxy globally by calling
QNetworkProxy::setUseSystemConfiguration(false).
Change-Id: If6f5d978316b603c53520512dac1eac57ab6c176
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
-rw-r--r-- | src/core/proxy_config_service_qt.cpp | 3 | ||||
-rw-r--r-- | src/webengine/doc/src/qtwebengine-overview.qdoc | 8 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/core/proxy_config_service_qt.cpp b/src/core/proxy_config_service_qt.cpp index 28a36d37f..5bc30b6bc 100644 --- a/src/core/proxy_config_service_qt.cpp +++ b/src/core/proxy_config_service_qt.cpp @@ -109,7 +109,8 @@ net::ProxyConfigService::ConfigAvailability ProxyConfigServiceQt::GetLatestProxy } m_qtApplicationProxy = qtProxy; m_qtProxyConfig = net::ProxyConfig(); - if (qtProxy.type() == QNetworkProxy::NoProxy) { + if (qtProxy.type() == QNetworkProxy::NoProxy + && QNetworkProxyFactory::usesSystemConfiguration()) { *config = systemConfig; return systemAvailability; } diff --git a/src/webengine/doc/src/qtwebengine-overview.qdoc b/src/webengine/doc/src/qtwebengine-overview.qdoc index d5b7d40a0..273d32861 100644 --- a/src/webengine/doc/src/qtwebengine-overview.qdoc +++ b/src/webengine/doc/src/qtwebengine-overview.qdoc @@ -197,9 +197,11 @@ \section1 Proxy Support - If QNetworkProxy::applicationProxy is set, it will also be used for Qt WebEngine. Otherwise, - Qt WebEngine automatically picks up the proxy configuration from OS X and Windows. On Linux, - it acknowledges settings from KDE and Gnome. + Qt WebEngine uses the proxy settings from \l{Qt Network}. If + QNetworkProxy::applicationProxy is set, it will also be used for Qt WebEngine, and if + QNetworkProxy::usesSystemConfiguration() is enabled, the proxy settings are automatically + retrieved from the system. Settings from an installed QNetworkProxyFactory will be ignored + though. If a proxy requires authentication, QWebEnginePage::proxyAuthenticationRequired is emitted. For Qt Quick, a dialog is shown. |