From 6ed6f84f6e8b5a04f4328b3ec4cd717bbf2d8026 Mon Sep 17 00:00:00 2001 From: Klaas Freitag Date: Thu, 12 Jun 2014 16:51:47 +0200 Subject: [PATCH] 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 ac7208eab..49bc75320 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*"); } @@ -375,4 +376,14 @@ void Account::slotHandleErrors(QNetworkReply *reply , QList 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 d782a7498..85e91b61a 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 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; }; }