mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 06:55:59 +03:00
Add network proxy setting property to account
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
15bc9a4892
commit
2501cdf44d
2 changed files with 22 additions and 0 deletions
|
@ -1088,5 +1088,19 @@ void Account::updateDesktopEnterpriseChannel()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Account::AccountNetworkProxySetting Account::networkProxySetting() const
|
||||||
|
{
|
||||||
|
return _networkProxySetting;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Account::setNetworkProxySetting(const AccountNetworkProxySetting setting)
|
||||||
|
{
|
||||||
|
if (setting == _networkProxySetting) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_networkProxySetting = setting;
|
||||||
|
emit networkProxySettingChanged();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace OCC
|
} // namespace OCC
|
||||||
|
|
|
@ -90,6 +90,7 @@ class OWNCLOUDSYNC_EXPORT Account : public QObject
|
||||||
Q_PROPERTY(QUrl url MEMBER _url)
|
Q_PROPERTY(QUrl url MEMBER _url)
|
||||||
Q_PROPERTY(bool e2eEncryptionKeysGenerationAllowed MEMBER _e2eEncryptionKeysGenerationAllowed)
|
Q_PROPERTY(bool e2eEncryptionKeysGenerationAllowed MEMBER _e2eEncryptionKeysGenerationAllowed)
|
||||||
Q_PROPERTY(bool askUserForMnemonic READ askUserForMnemonic WRITE setAskUserForMnemonic NOTIFY askUserForMnemonicChanged)
|
Q_PROPERTY(bool askUserForMnemonic READ askUserForMnemonic WRITE setAskUserForMnemonic NOTIFY askUserForMnemonicChanged)
|
||||||
|
Q_PROPERTY(AccountNetworkProxySetting networkProxySetting READ networkProxySetting WRITE setNetworkProxySetting NOTIFY networkProxySettingChanged)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum class AccountNetworkProxySetting {
|
enum class AccountNetworkProxySetting {
|
||||||
|
@ -354,6 +355,10 @@ public:
|
||||||
void updateServerSubcription();
|
void updateServerSubcription();
|
||||||
void updateDesktopEnterpriseChannel();
|
void updateDesktopEnterpriseChannel();
|
||||||
|
|
||||||
|
// Network-related settings
|
||||||
|
[[nodiscard]] AccountNetworkProxySetting networkProxySetting() const;
|
||||||
|
void setNetworkProxySetting(AccountNetworkProxySetting networkProxySetting);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
/// Used when forgetting credentials
|
/// Used when forgetting credentials
|
||||||
void clearQNAMCache();
|
void clearQNAMCache();
|
||||||
|
@ -398,6 +403,8 @@ signals:
|
||||||
void lockFileSuccess();
|
void lockFileSuccess();
|
||||||
void lockFileError(const QString&);
|
void lockFileError(const QString&);
|
||||||
|
|
||||||
|
void networkProxySettingChanged();
|
||||||
|
|
||||||
protected Q_SLOTS:
|
protected Q_SLOTS:
|
||||||
void slotCredentialsFetched();
|
void slotCredentialsFetched();
|
||||||
void slotCredentialsAsked();
|
void slotCredentialsAsked();
|
||||||
|
@ -473,6 +480,7 @@ private:
|
||||||
|
|
||||||
QHash<QString, QVector<SyncFileItem::LockStatus>> _lockStatusChangeInprogress;
|
QHash<QString, QVector<SyncFileItem::LockStatus>> _lockStatusChangeInprogress;
|
||||||
|
|
||||||
|
AccountNetworkProxySetting _networkProxySetting = AccountNetworkProxySetting::GlobalProxy;
|
||||||
/* IMPORTANT - remove later - FIXME MS@2019-12-07 -->
|
/* IMPORTANT - remove later - FIXME MS@2019-12-07 -->
|
||||||
* TODO: For "Log out" & "Remove account": Remove client CA certs and KEY!
|
* TODO: For "Log out" & "Remove account": Remove client CA certs and KEY!
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue