From 3453234a3b940fbc9703dd3bdb9e89561c2cd92c Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 14 Nov 2015 10:43:37 -0800 Subject: [PATCH] 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 --- desktop-widgets/mainwindow.cpp | 1 - subsurface-core/qt-gui.h | 1 - subsurface-core/qthelper.cpp | 13 +++++++++++++ subsurface-core/qthelper.h | 1 + subsurface-mobile-helper.cpp | 13 ------------- 5 files changed, 14 insertions(+), 15 deletions(-) diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index 632e32462..5e80a345b 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -41,7 +41,6 @@ #include "windowtitleupdate.h" #include "locationinformation.h" #include "preferences/preferencesdialog.h" -#include "qt-gui.h" #ifndef NO_USERMANUAL #include "usermanual.h" diff --git a/subsurface-core/qt-gui.h b/subsurface-core/qt-gui.h index bb381d1d3..ca038b145 100644 --- a/subsurface-core/qt-gui.h +++ b/subsurface-core/qt-gui.h @@ -5,7 +5,6 @@ void init_qt_late(); void init_ui(); -void init_proxy(); void run_ui(); void exit_ui(); 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); +} diff --git a/subsurface-core/qthelper.h b/subsurface-core/qthelper.h index a2b7b6c39..5fbc6dbe4 100644 --- a/subsurface-core/qthelper.h +++ b/subsurface-core/qthelper.h @@ -131,5 +131,6 @@ QByteArray getCurrentAppState(); void setCurrentAppState(QByteArray state); extern "C" bool in_planner(); extern "C" void subsurface_mkdir(const char *dir); +void init_proxy(); #endif // QTHELPER_H diff --git a/subsurface-mobile-helper.cpp b/subsurface-mobile-helper.cpp index 170317100..f7eaca10f 100644 --- a/subsurface-mobile-helper.cpp +++ b/subsurface-mobile-helper.cpp @@ -27,19 +27,6 @@ void init_ui() init_qt_late(); } -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); -} - void run_ui() { qmlRegisterType("org.subsurfacedivelog.mobile", 1, 0, "QMLManager");