[Pkg-owncloud-commits] [owncloud-client] 05/38: Account: Add a wasMigrated flag.

Sandro Knauß hefee-guest at moszumanska.debian.org
Fri Sep 5 20:20:54 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 6ed6f84f6e8b5a04f4328b3ec4cd717bbf2d8026
Author: Klaas Freitag <freitag at owncloud.com>
Date:   Thu Jun 12 16:51:47 2014 +0200

    Account: Add a wasMigrated flag.
    
    If an account in a branded client was migrated from a former ownCloud
    configuration, the method wasMigrated() will return true.
---
 src/mirall/account.cpp | 11 +++++++++++
 src/mirall/account.h   |  8 ++++++++
 2 files changed, 19 insertions(+)

diff --git a/src/mirall/account.cpp b/src/mirall/account.cpp
index ac7208e..49bc753 100644
--- a/src/mirall/account.cpp
+++ b/src/mirall/account.cpp
@@ -72,6 +72,7 @@ Account::Account(AbstractSslErrorHandler *sslErrorHandler, QObject *parent)
     , _treatSslErrorsAsFailure(false)
     , _state(Account::Disconnected)
     , _davPath("remote.php/webdav/")
+    , _wasMigrated(false)
 {
     qRegisterMetaType<Account*>("Account*");
 }
@@ -375,4 +376,14 @@ void Account::slotHandleErrors(QNetworkReply *reply , QList<QSslError> errors)
     }
 }
 
+bool Account::wasMigrated()
+{
+    return _wasMigrated;
+}
+
+void Account::setMigrated(bool mig)
+{
+    _wasMigrated = mig;
+}
+
 } // namespace Mirall
diff --git a/src/mirall/account.h b/src/mirall/account.h
index d782a74..85e91b6 100644
--- a/src/mirall/account.h
+++ b/src/mirall/account.h
@@ -108,6 +108,13 @@ public:
     /** Returns webdav entry URL, based on url() */
     QUrl davUrl() const;
 
+    /** set and retrieve the migration flag: if an account of a branded
+     *  client was migrated from a former ownCloud Account, this is true
+     */
+    void setMigrated(bool mig);
+    bool wasMigrated();
+
+
     QList<QNetworkCookie> lastAuthCookies() const;
 
     QNetworkReply* headRequest(const QString &relPath);
@@ -166,6 +173,7 @@ private:
     int _state;
     static QString _configFileName;
     QString _davPath; // default "remote.php/webdav/";
+    bool _wasMigrated;
 };
 
 }

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