Proxies: Enable ownBrander to force system proxy usage #4458

This commit is contained in:
Markus Goetz 2016-03-11 16:21:40 +01:00
parent 62d4ed8087
commit 6c07f08175
4 changed files with 16 additions and 0 deletions

View file

@ -86,6 +86,11 @@ QSize NetworkSettings::sizeHint() const {
void NetworkSettings::loadProxySettings()
{
if (Theme::instance()->forceSystemNetworkProxy()) {
_ui->systemProxyRadioButton->setChecked(true);
_ui->proxyGroupBox->setEnabled(false);
return;
}
// load current proxy settings
OCC::ConfigFile cfgFile;
int type = cfgFile.proxyType();

View file

@ -508,6 +508,9 @@ void ConfigFile::setValue(const QString& key, const QVariant &value)
int ConfigFile::proxyType() const
{
if (Theme::instance()->forceSystemNetworkProxy()) {
return QNetworkProxy::DefaultProxy;
}
return getValue(QLatin1String(proxyTypeC)).toInt();
}

View file

@ -427,6 +427,12 @@ bool Theme::userGroupSharing() const
return true;
}
bool Theme::forceSystemNetworkProxy() const
{
return false;
}
} // end namespace client

View file

@ -237,6 +237,8 @@ public:
virtual bool linkSharing() const;
virtual bool userGroupSharing() const;
virtual bool forceSystemNetworkProxy() const;
protected:
#ifndef TOKEN_AUTH_ONLY
QIcon themeIcon(const QString& name, bool sysTray = false) const;