From 4f49a69d7db9f26dea52c8effafba1f63261aa98 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sat, 13 Jul 2013 14:42:26 +0200 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-gui.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qt-gui.cpp b/qt-gui.cpp index eab282dc0..f955809d6 100644 --- a/qt-gui.cpp +++ b/qt-gui.cpp @@ -35,6 +35,7 @@ #include #include #include +#include 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+") -- cgit v1.2.3-70-g09d2