162 @param query reference to the query object |
162 @param query reference to the query object |
163 @type QNetworkProxyQuery |
163 @type QNetworkProxyQuery |
164 @return list of proxies in order of preference |
164 @return list of proxies in order of preference |
165 @rtype list of QNetworkProxy |
165 @rtype list of QNetworkProxy |
166 """ |
166 """ |
167 if ( |
167 # use proxy at all? |
|
168 if not EricPreferences.getNetworkProxy("UseProxy"): |
|
169 return [QNetworkProxy(QNetworkProxy.ProxyType.NoProxy)] |
|
170 |
|
171 elif ( |
168 query.queryType() == QNetworkProxyQuery.QueryType.UrlRequest |
172 query.queryType() == QNetworkProxyQuery.QueryType.UrlRequest |
169 and query.protocolTag() in ["http", "https", "ftp"] |
173 and query.protocolTag() in ["http", "https", "ftp"] |
170 ): |
174 ): |
171 # use proxy at all? |
|
172 if not EricPreferences.getNetworkProxy("UseProxy"): |
|
173 return [QNetworkProxy(QNetworkProxy.ProxyType.NoProxy)] |
|
174 |
|
175 # test for exceptions |
175 # test for exceptions |
176 exceptions = EricPreferences.getNetworkProxy("ProxyExceptions") |
176 exceptions = EricPreferences.getNetworkProxy("ProxyExceptions") |
177 if exceptions != self.__exceptions: |
177 if exceptions != self.__exceptions: |
178 self.__setExceptions(exceptions) |
178 self.__setExceptions(exceptions) |
179 urlHost = query.url().host() |
179 urlHost = query.url().host() |