[Pkg-owncloud-commits] [owncloud-client] 62/470: AccountManager: take theURL from the Theme rather than from the config if the theme specify it

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu May 12 16:24:44 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 7e5d89293d7bd52ac42d026d34a8154fbbdf33bb
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Tue Feb 23 18:10:11 2016 +0100

    AccountManager: take theURL from the Theme rather than from the config if the theme specify it
    
    That way an upgrade of the client can actually change the URL
    Issue https://github.com/owncloud/enterprise/issues/1113
---
 src/gui/accountmanager.cpp | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/gui/accountmanager.cpp b/src/gui/accountmanager.cpp
index 0b5eed4..590bfb6 100644
--- a/src/gui/accountmanager.cpp
+++ b/src/gui/accountmanager.cpp
@@ -194,7 +194,14 @@ AccountPtr AccountManager::load(QSettings& settings)
 {
     auto acc = createAccount();
 
-    acc->setUrl(settings.value(QLatin1String(urlC)).toUrl());
+    QString overrideUrl = Theme::instance()->overrideServerUrl();
+    if( !overrideUrl.isEmpty() ) {
+        // if there is a overrideUrl, don't even bother reading from the config as all the accounts
+        // must use the overrideUrl
+        acc->setUrl(overrideUrl);
+    } else {
+        acc->setUrl(settings.value(QLatin1String(urlC)).toUrl());
+    }
 
     // We want to only restore settings for that auth type and the user value
     acc->_settingsMap.insert(QLatin1String(userC), settings.value(userC));

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