82 if query.queryType() == QNetworkProxyQuery.UrlRequest and \ |
82 if query.queryType() == QNetworkProxyQuery.UrlRequest and \ |
83 query.protocolTag() in ["http", "https", "ftp"] and \ |
83 query.protocolTag() in ["http", "https", "ftp"] and \ |
84 Preferences.getUI("UseProxy"): |
84 Preferences.getUI("UseProxy"): |
85 if Preferences.getUI("UseSystemProxy"): |
85 if Preferences.getUI("UseSystemProxy"): |
86 proxyList = QNetworkProxyFactory.systemProxyForQuery(query) |
86 proxyList = QNetworkProxyFactory.systemProxyForQuery(query) |
87 if (not Globals.isWindowsPlatform() and \ |
87 if not Globals.isWindowsPlatform() and \ |
88 not Globals.isMacPlatform()) and \ |
|
89 len(proxyList) == 1 and \ |
88 len(proxyList) == 1 and \ |
90 proxyList[0].type() == QNetworkProxy.NoProxy: |
89 proxyList[0].type() == QNetworkProxy.NoProxy: |
91 # try it the Python way |
90 # try it the Python way |
92 # scan the environment for variables named <scheme>_proxy |
91 # scan the environment for variables named <scheme>_proxy |
93 # scan over whole environment to make this case insensitive |
92 # scan over whole environment to make this case insensitive |