aboutsummaryrefslogtreecommitdiff
path: root/networksettings.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2017-12-28 16:28:41 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2017-12-28 16:28:41 +0900
commit206834e8dc637287baf7e631065de6d951e704bf (patch)
tree119157ab7f964be9b6b93451c6a248b5fedcb843 /networksettings.h
parenta3b9fe1ddd2d3b0a0cbb07ffc42317b30a1a3899 (diff)
downloadlibquotient-206834e8dc637287baf7e631065de6d951e704bf.tar.gz
libquotient-206834e8dc637287baf7e631065de6d951e704bf.zip
NetworkSettings: add setupApplicationProxy() accessible from QML; proxyPort is quint16 now
setupApplicationProxy(), so that clients in QML could apply changes in proxy settings without going down to C++. quint16, because this is a type actually used by QNetworkProxy.
Diffstat (limited to 'networksettings.h')
-rw-r--r--networksettings.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/networksettings.h b/networksettings.h
index e113cd9b..83613060 100644
--- a/networksettings.h
+++ b/networksettings.h
@@ -30,7 +30,7 @@ namespace QMatrixClient {
Q_OBJECT
QMC_DECLARE_SETTING(QNetworkProxy::ProxyType, proxyType, setProxyType)
QMC_DECLARE_SETTING(QString, proxyHostName, setProxyHostName)
- QMC_DECLARE_SETTING(int, proxyPort, setProxyPort)
+ QMC_DECLARE_SETTING(quint16, proxyPort, setProxyPort)
Q_PROPERTY(QString proxyHost READ proxyHostName WRITE setProxyHostName)
public:
template <typename... ArgTs>
@@ -38,5 +38,7 @@ namespace QMatrixClient {
: SettingsGroup(QStringLiteral("Network"), qsettingsArgs...)
{ }
~NetworkSettings() override = default;
+
+ Q_INVOKABLE void setupApplicationProxy() const;
};
}