diff options
author | Peter Hartmann <phartmann@rim.com> | 2012-10-23 13:31:20 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-10-31 23:55:10 (GMT) |
commit | d7e922e6b197193fe4a2284b5e25cfb9a4fdd278 (patch) | |
tree | 92e0d03536a7ad35e4f006c3449577f38abb302b /src | |
parent | 9b4bd98744623f81b7b0950e207209f0c19adb46 (diff) | |
download | Qt-d7e922e6b197193fe4a2284b5e25cfb9a4fdd278.zip Qt-d7e922e6b197193fe4a2284b5e25cfb9a4fdd278.tar.gz Qt-d7e922e6b197193fe4a2284b5e25cfb9a4fdd278.tar.bz2 |
QtNetwork: introduce configure switch to use system proxies by default
This option is opt-in (default: no). When configured with
"-system-proxies", Qt automatically picks up the system
proxies.
(backport of commit f7893223e84db86dcdd860c625663d7006fcdad6)
Change-Id: I95c3b17abee0691991a60a386052b4c2989f896c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/network/kernel/qnetworkproxy.cpp | 3 | ||||
-rw-r--r-- | src/network/socket/socket.pri | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/network/kernel/qnetworkproxy.cpp b/src/network/kernel/qnetworkproxy.cpp index 393f049..f0b973b 100644 --- a/src/network/kernel/qnetworkproxy.cpp +++ b/src/network/kernel/qnetworkproxy.cpp @@ -247,6 +247,9 @@ public: , socks5SocketEngineHandler(0) , httpSocketEngineHandler(0) { +#ifdef QT_USE_SYSTEM_PROXIES + setApplicationProxyFactory(new QSystemConfigurationProxyFactory); +#endif #ifndef QT_NO_SOCKS5 socks5SocketEngineHandler = new QSocks5SocketEngineHandler(); #endif diff --git a/src/network/socket/socket.pri b/src/network/socket/socket.pri index ac90012..bd5e866 100644 --- a/src/network/socket/socket.pri +++ b/src/network/socket/socket.pri @@ -68,3 +68,7 @@ integrity: { DEFINES += QT_LOCALSOCKET_TCP } + +contains(QT_CONFIG, system-proxies) { + DEFINES += QT_USE_SYSTEM_PROXIES +} |