mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-25 14:36:01 +03:00
Correctly load global proxy setting state on account-specific network settings
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
480828bbbb
commit
9c856d29d4
1 changed files with 18 additions and 14 deletions
|
@ -134,20 +134,24 @@ void NetworkSettings::loadProxySettings()
|
|||
const auto proxyPassword = useGlobalProxy ? cfgFile.proxyPassword() : _account->proxyPassword();
|
||||
|
||||
// load current proxy settings
|
||||
switch (proxyType) {
|
||||
case QNetworkProxy::NoProxy:
|
||||
_ui->noProxyRadioButton->setChecked(true);
|
||||
break;
|
||||
case QNetworkProxy::DefaultProxy:
|
||||
_ui->systemProxyRadioButton->setChecked(true);
|
||||
break;
|
||||
case QNetworkProxy::Socks5Proxy:
|
||||
case QNetworkProxy::HttpProxy:
|
||||
_ui->typeComboBox->setCurrentIndex(_ui->typeComboBox->findData(proxyType));
|
||||
_ui->manualProxyRadioButton->setChecked(true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
if (_account && _account->networkProxySetting() == Account::AccountNetworkProxySetting::GlobalProxy) {
|
||||
_ui->globalProxySettingsRadioButton->setChecked(true);
|
||||
} else {
|
||||
switch (proxyType) {
|
||||
case QNetworkProxy::NoProxy:
|
||||
_ui->noProxyRadioButton->setChecked(true);
|
||||
break;
|
||||
case QNetworkProxy::DefaultProxy:
|
||||
_ui->systemProxyRadioButton->setChecked(true);
|
||||
break;
|
||||
case QNetworkProxy::Socks5Proxy:
|
||||
case QNetworkProxy::HttpProxy:
|
||||
_ui->typeComboBox->setCurrentIndex(_ui->typeComboBox->findData(proxyType));
|
||||
_ui->manualProxyRadioButton->setChecked(true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
_ui->hostLineEdit->setText(proxyHostName);
|
||||
|
|
Loading…
Reference in a new issue