1 | // SPDX-FileCopyrightText: 2017 Kitsune Ral <kitsune-ral@users.sf.net> |
2 | // SPDX-License-Identifier: LGPL-2.1-or-later |
3 | |
4 | #include "networksettings.h" |
5 | |
6 | using namespace Quotient; |
7 | |
8 | void NetworkSettings::setupApplicationProxy() const |
9 | { |
10 | QNetworkProxy::setApplicationProxy( |
11 | { proxyType(), proxyHostName(), proxyPort() }); |
12 | } |
13 | |
14 | QUO_DEFINE_SETTING(NetworkSettings, QNetworkProxy::ProxyType, proxyType, |
15 | "proxy_type" , QNetworkProxy::DefaultProxy, setProxyType) |
16 | QUO_DEFINE_SETTING(NetworkSettings, QString, proxyHostName, "proxy_hostname" , |
17 | {}, setProxyHostName) |
18 | QUO_DEFINE_SETTING(NetworkSettings, quint16, proxyPort, "proxy_port" , -1, |
19 | setProxyPort) |
20 | |