mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-01 06:30:26 +00:00
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:
parent
f470f559d1
commit
4f49a69d7d
1 changed files with 5 additions and 0 deletions
|
@ -35,6 +35,7 @@
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
#include <QMultiMap>
|
#include <QMultiMap>
|
||||||
|
#include <QNetworkProxy>
|
||||||
|
|
||||||
const char *default_dive_computer_vendor;
|
const char *default_dive_computer_vendor;
|
||||||
const char *default_dive_computer_product;
|
const char *default_dive_computer_product;
|
||||||
|
@ -97,6 +98,10 @@ void init_ui(int *argcp, char ***argvp)
|
||||||
|
|
||||||
application = new QApplication(*argcp, *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
|
// the Gtk theme makes things unbearably ugly
|
||||||
// so switch to Oxygen in this case
|
// so switch to Oxygen in this case
|
||||||
if (application->style()->objectName() == "gtk+")
|
if (application->style()->objectName() == "gtk+")
|
||||||
|
|
Loading…
Reference in a new issue