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.
This commit is contained in:
Klaas Freitag 2014-06-12 16:51:47 +02:00
parent ff0ba56bc3
commit 6ed6f84f6e
2 changed files with 19 additions and 0 deletions

View file

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

View file

@ -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;
};
}