mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-29 04:08:54 +03:00
Proxies: Enable ownBrander to force system proxy usage #4458
This commit is contained in:
parent
62d4ed8087
commit
6c07f08175
4 changed files with 16 additions and 0 deletions
|
@ -86,6 +86,11 @@ QSize NetworkSettings::sizeHint() const {
|
||||||
|
|
||||||
void NetworkSettings::loadProxySettings()
|
void NetworkSettings::loadProxySettings()
|
||||||
{
|
{
|
||||||
|
if (Theme::instance()->forceSystemNetworkProxy()) {
|
||||||
|
_ui->systemProxyRadioButton->setChecked(true);
|
||||||
|
_ui->proxyGroupBox->setEnabled(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
// load current proxy settings
|
// load current proxy settings
|
||||||
OCC::ConfigFile cfgFile;
|
OCC::ConfigFile cfgFile;
|
||||||
int type = cfgFile.proxyType();
|
int type = cfgFile.proxyType();
|
||||||
|
|
|
@ -508,6 +508,9 @@ void ConfigFile::setValue(const QString& key, const QVariant &value)
|
||||||
|
|
||||||
int ConfigFile::proxyType() const
|
int ConfigFile::proxyType() const
|
||||||
{
|
{
|
||||||
|
if (Theme::instance()->forceSystemNetworkProxy()) {
|
||||||
|
return QNetworkProxy::DefaultProxy;
|
||||||
|
}
|
||||||
return getValue(QLatin1String(proxyTypeC)).toInt();
|
return getValue(QLatin1String(proxyTypeC)).toInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -427,6 +427,12 @@ bool Theme::userGroupSharing() const
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Theme::forceSystemNetworkProxy() const
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} // end namespace client
|
} // end namespace client
|
||||||
|
|
||||||
|
|
|
@ -237,6 +237,8 @@ public:
|
||||||
virtual bool linkSharing() const;
|
virtual bool linkSharing() const;
|
||||||
virtual bool userGroupSharing() const;
|
virtual bool userGroupSharing() const;
|
||||||
|
|
||||||
|
virtual bool forceSystemNetworkProxy() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
#ifndef TOKEN_AUTH_ONLY
|
#ifndef TOKEN_AUTH_ONLY
|
||||||
QIcon themeIcon(const QString& name, bool sysTray = false) const;
|
QIcon themeIcon(const QString& name, bool sysTray = false) const;
|
||||||
|
|
Loading…
Reference in a new issue