[Pkg-owncloud-commits] [owncloud-client] 01/38: Account: Add a scoped pointer to the ownCloud theme.

Sandro Knauß hefee-guest at moszumanska.debian.org
Fri Sep 5 20:20:53 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch sid
in repository owncloud-client.

commit 5597ebe455cc4f6cd39758682a16dfa4697973e0
Author: Klaas Freitag <freitag at owncloud.com>
Date:   Thu Jun 12 11:38:39 2014 +0200

    Account: Add a scoped pointer to the ownCloud theme.
---
 src/mirall/account.cpp | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/mirall/account.cpp b/src/mirall/account.cpp
index a413691..ac7208e 100644
--- a/src/mirall/account.cpp
+++ b/src/mirall/account.cpp
@@ -18,6 +18,7 @@
 #include "mirall/mirallconfigfile.h"
 #include "mirall/mirallaccessmanager.h"
 #include "mirall/quotainfo.h"
+#include "mirall/owncloudtheme.h"
 #include "creds/abstractcredentials.h"
 #include "creds/credentialsfactory.h"
 
@@ -113,9 +114,19 @@ void Account::save()
 Account* Account::restore()
 {
     QScopedPointer<QSettings> settings(settingsWithGroup(Theme::instance()->appName()));
+    QScopedPointer<ownCloudTheme> ocTheme(new ownCloudTheme);
+
+    Account *acc = 0;
+    MirallConfigFile cfg;
+
+    if( settings->childKeys().isEmpty() ) {
+        // Now try to open the original ownCloud settings to see if they exist.
+        cfg.setTheme(ocTheme.data());
+    }
+
     if (!settings->childKeys().isEmpty()) {
-        Account *acc = new Account;
-        MirallConfigFile cfg;
+        acc = new Account;
+
         acc->setApprovedCerts(QSslCertificate::fromData(cfg.caCerts()));
         acc->setUrl(settings->value(QLatin1String(urlC)).toUrl());
         acc->setCredentials(CredentialsFactory::create(settings->value(QLatin1String(authTypeC)).toString()));

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