mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
76d0763527
commit
97fa132202
4 changed files with 17 additions and 9 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue