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 <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-11-14 10:43:37 -08:00
parent b688f417de
commit 3453234a3b
5 changed files with 14 additions and 15 deletions

View file

@ -41,7 +41,6 @@
#include "windowtitleupdate.h" #include "windowtitleupdate.h"
#include "locationinformation.h" #include "locationinformation.h"
#include "preferences/preferencesdialog.h" #include "preferences/preferencesdialog.h"
#include "qt-gui.h"
#ifndef NO_USERMANUAL #ifndef NO_USERMANUAL
#include "usermanual.h" #include "usermanual.h"

View file

@ -5,7 +5,6 @@
void init_qt_late(); void init_qt_late();
void init_ui(); void init_ui();
void init_proxy();
void run_ui(); void run_ui();
void exit_ui(); void exit_ui();

View file

@ -1678,3 +1678,16 @@ extern "C" bool in_planner()
{ {
return (currentApplicationState == "PlanDive" || currentApplicationState == "EditPlannedDive"); 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);
}

View file

@ -131,5 +131,6 @@ QByteArray getCurrentAppState();
void setCurrentAppState(QByteArray state); void setCurrentAppState(QByteArray state);
extern "C" bool in_planner(); extern "C" bool in_planner();
extern "C" void subsurface_mkdir(const char *dir); extern "C" void subsurface_mkdir(const char *dir);
void init_proxy();
#endif // QTHELPER_H #endif // QTHELPER_H

View file

@ -27,19 +27,6 @@ void init_ui()
init_qt_late(); 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() void run_ui()
{ {
qmlRegisterType<QMLManager>("org.subsurfacedivelog.mobile", 1, 0, "QMLManager"); qmlRegisterType<QMLManager>("org.subsurfacedivelog.mobile", 1, 0, "QMLManager");