Ask Qt to use system proxies in Subsurface

This causes the Marble widget to use proxies automatically too.

On Mac, this gets the global proxy settings; on Windows, it gets the
IE settings; on Unix, it uses environment variables (set http_proxy
and all_proxy).

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Thiago Macieira 2013-07-13 14:42:26 +02:00 committed by Dirk Hohndel
parent f470f559d1
commit 4f49a69d7d

View file

@ -35,6 +35,7 @@
#include <QDebug>
#include <QMap>
#include <QMultiMap>
#include <QNetworkProxy>
const char *default_dive_computer_vendor;
const char *default_dive_computer_product;
@ -97,6 +98,10 @@ void init_ui(int *argcp, char ***argvp)
application = new QApplication(*argcp, *argvp);
// tell Qt to use system proxies
// note: on Linux, "system" == "environment variables"
QNetworkProxyFactory::setUseSystemConfiguration(true);
// the Gtk theme makes things unbearably ugly
// so switch to Oxygen in this case
if (application->style()->objectName() == "gtk+")