mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-27 23:17:13 +03:00
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:
parent
ff0ba56bc3
commit
6ed6f84f6e
2 changed files with 19 additions and 0 deletions
|
@ -72,6 +72,7 @@ Account::Account(AbstractSslErrorHandler *sslErrorHandler, QObject *parent)
|
||||||
, _treatSslErrorsAsFailure(false)
|
, _treatSslErrorsAsFailure(false)
|
||||||
, _state(Account::Disconnected)
|
, _state(Account::Disconnected)
|
||||||
, _davPath("remote.php/webdav/")
|
, _davPath("remote.php/webdav/")
|
||||||
|
, _wasMigrated(false)
|
||||||
{
|
{
|
||||||
qRegisterMetaType<Account*>("Account*");
|
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
|
} // namespace Mirall
|
||||||
|
|
|
@ -108,6 +108,13 @@ public:
|
||||||
/** Returns webdav entry URL, based on url() */
|
/** Returns webdav entry URL, based on url() */
|
||||||
QUrl davUrl() const;
|
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;
|
QList<QNetworkCookie> lastAuthCookies() const;
|
||||||
|
|
||||||
QNetworkReply* headRequest(const QString &relPath);
|
QNetworkReply* headRequest(const QString &relPath);
|
||||||
|
@ -166,6 +173,7 @@ private:
|
||||||
int _state;
|
int _state;
|
||||||
static QString _configFileName;
|
static QString _configFileName;
|
||||||
QString _davPath; // default "remote.php/webdav/";
|
QString _davPath; // default "remote.php/webdav/";
|
||||||
|
bool _wasMigrated;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue