equal
deleted
inserted
replaced
155 if (!dict) { |
155 if (!dict) { |
156 qWarning("QNetworkProxyFactory::systemProxyForQuery: SCDynamicStoreCopyProxies returned NULL"); |
156 qWarning("QNetworkProxyFactory::systemProxyForQuery: SCDynamicStoreCopyProxies returned NULL"); |
157 return result; // failed |
157 return result; // failed |
158 } |
158 } |
159 |
159 |
160 if (isHostExcluded(dict, query.peerHostName())) |
160 if (isHostExcluded(dict, query.peerHostName())) { |
|
161 CFRelease(dict); |
161 return result; // no proxy for this host |
162 return result; // no proxy for this host |
|
163 } |
162 |
164 |
163 // is there a PAC enabled? If so, use it first. |
165 // is there a PAC enabled? If so, use it first. |
164 CFNumberRef pacEnabled; |
166 CFNumberRef pacEnabled; |
165 if ((pacEnabled = (CFNumberRef)CFDictionaryGetValue(dict, kSCPropNetProxiesProxyAutoConfigEnable))) { |
167 if ((pacEnabled = (CFNumberRef)CFDictionaryGetValue(dict, kSCPropNetProxiesProxyAutoConfigEnable))) { |
166 int enabled; |
168 int enabled; |
220 kSCPropNetProxiesHTTPSPort); |
222 kSCPropNetProxiesHTTPSPort); |
221 if (https.type() != QNetworkProxy::DefaultProxy && https != protocolSpecificProxy) |
223 if (https.type() != QNetworkProxy::DefaultProxy && https != protocolSpecificProxy) |
222 result << https; |
224 result << https; |
223 } |
225 } |
224 |
226 |
|
227 CFRelease(dict); |
225 return result; |
228 return result; |
226 } |
229 } |
227 |
230 |
228 QList<QNetworkProxy> QNetworkProxyFactory::systemProxyForQuery(const QNetworkProxyQuery &query) |
231 QList<QNetworkProxy> QNetworkProxyFactory::systemProxyForQuery(const QNetworkProxyQuery &query) |
229 { |
232 { |