QNetworkAccessManager doesn't obey QNetworkProxyFactory::setUseSystemConfiguration()
Consider the following code fragment:
Code:
QNetworkProxyFactory::setUseSystemConfiguration(true);
QNetworkAccessManager manager;
QNetworkProxy::ProxyType type
= manager.
proxy().
type();
//DefaultProxy QNetworkProxyFactory *factory = manager.proxyFactory(); //0x0
I'd expect QNetworkAccessManager to obey the internal global QNetworkProxyFactory created by QNetworkProxyFactory::setUseSystemConfiguration(true), but it doesn't.
(Observed on Windows - don't know if that matters.)
Is this a bug or a feature? If a feature, what might be the reasoning?
Re: QNetworkAccessManager doesn't obey QNetworkProxyFactory::setUseSystemConfiguratio
How have you verified that it does not use the global default proxy provided by QNetworkProxyFactory? All you have verified there is that there has been no specific proxy set on the QNetworkAccessManager, and it even tells you that it is using the default proxy.
Re: QNetworkAccessManager doesn't obey QNetworkProxyFactory::setUseSystemConfiguratio
I thought I have, first by assessing the application's reaction to various proxy settings, then by peeking QtNetwork sources and debugging into. I probably wasn't sufficiently thorough, though. I'll make up leeway, then return here.
Re: QNetworkAccessManager doesn't obey QNetworkProxyFactory::setUseSystemConfiguratio
Hmm, looks like I was rash.
Code:
QNetworkProxyFactory::setUseSystemConfiguration(true);
indeed seems to work as expected.
Thx for making me backpedal and reassess.
(I'll content myself with empiricism for now...)