mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 17:37:36 +03:00
parent
7ee83847c8
commit
ed8cdf6910
2 changed files with 16 additions and 15 deletions
|
@ -524,11 +524,13 @@ void MirallConfigFile::setProxyType(int proxyType,
|
|||
settings.beginGroup(QLatin1String("proxy"));
|
||||
|
||||
settings.setValue(QLatin1String("type"), proxyType);
|
||||
|
||||
if (proxyType == QNetworkProxy::HttpProxy) {
|
||||
settings.setValue(QLatin1String("host"), host);
|
||||
settings.setValue(QLatin1String("port"), port);
|
||||
settings.setValue(QLatin1String("user"), user);
|
||||
settings.setValue(QLatin1String("pass"), pass.toUtf8().toBase64());
|
||||
|
||||
}
|
||||
settings.sync();
|
||||
}
|
||||
|
||||
|
|
|
@ -37,11 +37,11 @@ Mirall::ProxyDialog::ProxyDialog( QWidget* parent )
|
|||
Mirall::MirallConfigFile cfgFile;
|
||||
if (cfgFile.proxyType() == QNetworkProxy::NoProxy)
|
||||
noProxyRadioButton->setChecked(true);
|
||||
if (cfgFile.proxyType() == QNetworkProxy::DefaultProxy)
|
||||
else if (cfgFile.proxyType() == QNetworkProxy::DefaultProxy)
|
||||
systemProxyRadioButton->setChecked(true);
|
||||
if (cfgFile.proxyType() == QNetworkProxy::HttpProxy)
|
||||
{
|
||||
else if (cfgFile.proxyType() == QNetworkProxy::HttpProxy)
|
||||
manualProxyRadioButton->setChecked(true);
|
||||
|
||||
hostLineEdit->setText(cfgFile.proxyHostName());
|
||||
portSpinBox->setValue(cfgFile.proxyPort());
|
||||
if (!cfgFile.proxyUser().isEmpty())
|
||||
|
@ -50,7 +50,6 @@ Mirall::ProxyDialog::ProxyDialog( QWidget* parent )
|
|||
userLineEdit->setText(cfgFile.proxyUser());
|
||||
passwordLineEdit->setText(cfgFile.proxyPassword());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Mirall::ProxyDialog::saveSettings()
|
||||
|
|
Loading…
Reference in a new issue