Fixes a problem with the proxy detection on Windows
authorThierry <thierryb@filewave.com>
Wed, 28 Mar 2012 18:09:20 +0000 (20:09 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 3 Apr 2012 10:45:46 +0000 (12:45 +0200)
commitaad60ec53683e057c05ff760200a467e844cfba3
tree5c4401b2e86142714a81f3e4a5cd718166a7266e
parent45b7b0599cd1ebdfe17487215b36ff766068f0e8
Fixes a problem with the proxy detection on Windows

The current scheme is to use IE's default config.
If that fails get the winhttp config.
That's ok. The problem is that if you run a program as a service
getting the IE config will set the fAutoDetect flag.
But later the call to WinHttpGetProxyForUrl mightfail with the
error code ERROR_WINHTTP_AUTODETECTION_FAILED.
this patch just makes sure that we have a fallback winhttp solution
in case the IE proxy is not set.
The new code detcted if the current process is a service, in which case it
will try to default to the system-wide proxy.

Change-Id: I57e9082a46a8422c54f8f069715752c271a3a001
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
src/network/kernel/qnetworkproxy_win.cpp