[Pkg-owncloud-commits] [owncloud-client] 140/470: Proxies: Enable ownBrander to force system proxy usage #4458
Sandro Knauß
hefee-guest at moszumanska.debian.org
Thu May 12 16:24:55 UTC 2016
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit 6c07f08175f031ce70cc0b7512343b03e6f898b6
Author: Markus Goetz <markus at woboq.com>
Date: Fri Mar 11 16:21:40 2016 +0100
Proxies: Enable ownBrander to force system proxy usage #4458
---
src/gui/networksettings.cpp | 5 +++++
src/libsync/configfile.cpp | 3 +++
src/libsync/theme.cpp | 6 ++++++
src/libsync/theme.h | 2 ++
4 files changed, 16 insertions(+)
diff --git a/src/gui/networksettings.cpp b/src/gui/networksettings.cpp
index 6a21f04..7c40850 100644
--- a/src/gui/networksettings.cpp
+++ b/src/gui/networksettings.cpp
@@ -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();
diff --git a/src/libsync/configfile.cpp b/src/libsync/configfile.cpp
index 32d2475..3ed833c 100644
--- a/src/libsync/configfile.cpp
+++ b/src/libsync/configfile.cpp
@@ -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();
}
diff --git a/src/libsync/theme.cpp b/src/libsync/theme.cpp
index 1a80f4c..ff2cce9 100644
--- a/src/libsync/theme.cpp
+++ b/src/libsync/theme.cpp
@@ -427,6 +427,12 @@ bool Theme::userGroupSharing() const
return true;
}
+bool Theme::forceSystemNetworkProxy() const
+{
+ return false;
+}
+
+
} // end namespace client
diff --git a/src/libsync/theme.h b/src/libsync/theme.h
index c86d848..d93fcb1 100644
--- a/src/libsync/theme.h
+++ b/src/libsync/theme.h
@@ -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;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list