[Pkg-owncloud-commits] [owncloud-client] 32/159: Proxy: Fix issues with previous patch

Sandro Knauß hefee-guest at moszumanska.debian.org
Fri May 1 13:05:19 UTC 2015


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 a2022033256c1617c164ca5ac52d580f4d091e66
Author: Markus Goetz <markus at woboq.com>
Date:   Wed Mar 25 12:25:18 2015 +0100

    Proxy: Fix issues with previous patch
    
    This is for #2993 and #2802
---
 src/gui/folderman.cpp               | 7 +++++++
 src/libsync/clientproxy.cpp         | 1 +
 src/libsync/connectionvalidator.cpp | 2 ++
 3 files changed, 10 insertions(+)

diff --git a/src/gui/folderman.cpp b/src/gui/folderman.cpp
index 0c70b2a..5658424 100644
--- a/src/gui/folderman.cpp
+++ b/src/gui/folderman.cpp
@@ -873,6 +873,13 @@ void FolderMan::setDirtyProxy(bool value)
     foreach( Folder *f, _folderMap.values() ) {
         if(f) {
             f->setProxyDirty(value);
+
+            if (f->accountState() && f->accountState()->account()
+                    && f->accountState()->account()->networkAccessManager()) {
+                // Need to do this have us not use the old determined system proxy
+                f->accountState()->account()->networkAccessManager()->setProxy(
+                            QNetworkProxy(QNetworkProxy::DefaultProxy));
+            }
         }
     }
 }
diff --git a/src/libsync/clientproxy.cpp b/src/libsync/clientproxy.cpp
index 85b3864..a3f9972 100644
--- a/src/libsync/clientproxy.cpp
+++ b/src/libsync/clientproxy.cpp
@@ -65,6 +65,7 @@ void ClientProxy::setupQtProxyFromConfig()
 
     switch(proxyType) {
     case QNetworkProxy::NoProxy:
+        qDebug() << "Set proxy configuration to use NO proxy";
         QNetworkProxyFactory::setUseSystemConfiguration(false);
         QNetworkProxy::setApplicationProxy(QNetworkProxy::NoProxy);
         break;
diff --git a/src/libsync/connectionvalidator.cpp b/src/libsync/connectionvalidator.cpp
index 0e60439..dd2825f 100644
--- a/src/libsync/connectionvalidator.cpp
+++ b/src/libsync/connectionvalidator.cpp
@@ -71,6 +71,8 @@ void ConnectionValidator::checkServerAndAuth()
         ClientProxy::lookupSystemProxyAsync(_account->url(),
                                             this, SLOT(systemProxyLookupDone(QNetworkProxy)));
     } else {
+        // We want to reset the QNAM proxy so that the global proxy settings are used (via ClientProxy settings)
+        _account->networkAccessManager()->setProxy(QNetworkProxy(QNetworkProxy::DefaultProxy));
         // use a queued invocation so we're as asynchronous as with the other code path
         QMetaObject::invokeMethod(this, "slotCheckServerAndAuth", Qt::QueuedConnection);
     }

-- 
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