mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 13:05:51 +03:00
Add proxy port property to account
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
a4553f5929
commit
8c6a181ee3
2 changed files with 21 additions and 0 deletions
|
@ -1133,4 +1133,19 @@ void Account::setProxyHostName(const QString &hostName)
|
|||
emit proxyHostNameChanged();
|
||||
}
|
||||
|
||||
int Account::proxyPort() const
|
||||
{
|
||||
return _proxyPort;
|
||||
}
|
||||
|
||||
void Account::setProxyPort(const int port)
|
||||
{
|
||||
if (_proxyPort == port) {
|
||||
return;
|
||||
}
|
||||
|
||||
_proxyPort = port;
|
||||
emit proxyPortChanged();
|
||||
}
|
||||
|
||||
} // namespace OCC
|
||||
|
|
|
@ -94,6 +94,7 @@ class OWNCLOUDSYNC_EXPORT Account : public QObject
|
|||
Q_PROPERTY(AccountNetworkProxySetting networkProxySetting READ networkProxySetting WRITE setNetworkProxySetting NOTIFY networkProxySettingChanged)
|
||||
Q_PROPERTY(QNetworkProxy::ProxyType proxyType READ proxyType WRITE setProxyType NOTIFY proxyTypeChanged)
|
||||
Q_PROPERTY(QString proxyHostName READ proxyHostName WRITE setProxyHostName NOTIFY proxyHostNameChanged)
|
||||
Q_PROPERTY(int proxyPort READ proxyPort WRITE setProxyPort NOTIFY proxyPortChanged)
|
||||
|
||||
public:
|
||||
enum class AccountNetworkProxySetting {
|
||||
|
@ -368,6 +369,9 @@ public:
|
|||
[[nodiscard]] QString proxyHostName() const;
|
||||
void setProxyHostName(const QString &host);
|
||||
|
||||
[[nodiscard]] int proxyPort() const;
|
||||
void setProxyPort(int port);
|
||||
|
||||
public slots:
|
||||
/// Used when forgetting credentials
|
||||
void clearQNAMCache();
|
||||
|
@ -415,6 +419,7 @@ signals:
|
|||
void networkProxySettingChanged();
|
||||
void proxyTypeChanged();
|
||||
void proxyHostNameChanged();
|
||||
void proxyPortChanged();
|
||||
|
||||
protected Q_SLOTS:
|
||||
void slotCredentialsFetched();
|
||||
|
@ -494,6 +499,7 @@ private:
|
|||
AccountNetworkProxySetting _networkProxySetting = AccountNetworkProxySetting::GlobalProxy;
|
||||
QNetworkProxy::ProxyType _proxyType = QNetworkProxy::NoProxy;
|
||||
QString _proxyHostName;
|
||||
int _proxyPort = 0;
|
||||
/* IMPORTANT - remove later - FIXME MS@2019-12-07 -->
|
||||
* TODO: For "Log out" & "Remove account": Remove client CA certs and KEY!
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue