diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-11-14 09:38:18 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-11-14 09:39:02 -0800 |
commit | 97fa1322025746d04813315992b7d87d6b782ce0 (patch) | |
tree | 1153c3258828a1ba3c90bca77b5751ca9e5c60c9 /desktop-widgets | |
parent | 76d07635270bb3068b7d9a559b481d3c094f0d7b (diff) | |
download | subsurface-97fa1322025746d04813315992b7d87d6b782ce0.tar.gz |
Move proxy initialization into shared code
This way we can use the same code on desktop and mobile app.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets')
-rw-r--r-- | desktop-widgets/mainwindow.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index d31a2379f..632e32462 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -41,6 +41,7 @@ #include "windowtitleupdate.h" #include "locationinformation.h" #include "preferences/preferencesdialog.h" +#include "qt-gui.h" #ifndef NO_USERMANUAL #include "usermanual.h" @@ -1234,15 +1235,7 @@ void MainWindow::readSettings() default_dive_computer_device = getSetting(s, "dive_computer_device"); default_dive_computer_download_mode = s.value("dive_computer_download_mode").toInt(); s.endGroup(); - 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); + init_proxy(); // now make sure that the cloud menu items are enabled IFF cloud account is verified enableDisableCloudActions(); |