From 3453234a3b940fbc9703dd3bdb9e89561c2cd92c Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 14 Nov 2015 10:43:37 -0800 Subject: Missing half of the previous commit Oops. I fixed the previous commit, tested the fix, and then forgot to update the commit and instead pushed it out. That was dumb. Signed-off-by: Dirk Hohndel --- subsurface-core/qthelper.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'subsurface-core/qthelper.cpp') diff --git a/subsurface-core/qthelper.cpp b/subsurface-core/qthelper.cpp index c1205ce6f..091e714de 100644 --- a/subsurface-core/qthelper.cpp +++ b/subsurface-core/qthelper.cpp @@ -1678,3 +1678,16 @@ extern "C" bool in_planner() { return (currentApplicationState == "PlanDive" || currentApplicationState == "EditPlannedDive"); } + +void init_proxy() +{ + QNetworkProxy proxy; + proxy.setType(QNetworkProxy::ProxyType(prefs.proxy_type)); + proxy.setHostName(prefs.proxy_host); + proxy.setPort(prefs.proxy_port); + if (prefs.proxy_auth) { + proxy.setUser(prefs.proxy_user); + proxy.setPassword(prefs.proxy_pass); + } + QNetworkProxy::setApplicationProxy(proxy); +} -- cgit v1.2.3-70-g09d2