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:
Claudio Cambra 2024-07-07 20:42:43 +08:00
parent 480828bbbb
commit 9c856d29d4
No known key found for this signature in database
GPG key ID: C839200C384636B0

View file

@ -134,6 +134,9 @@ void NetworkSettings::loadProxySettings()
const auto proxyPassword = useGlobalProxy ? cfgFile.proxyPassword() : _account->proxyPassword();
// load current proxy settings
if (_account && _account->networkProxySetting() == Account::AccountNetworkProxySetting::GlobalProxy) {
_ui->globalProxySettingsRadioButton->setChecked(true);
} else {
switch (proxyType) {
case QNetworkProxy::NoProxy:
_ui->noProxyRadioButton->setChecked(true);
@ -149,6 +152,7 @@ void NetworkSettings::loadProxySettings()
default:
break;
}
}
_ui->hostLineEdit->setText(proxyHostName);
_ui->portSpinBox->setValue(proxyPort == 0 ? 8080 : proxyPort);