// try to open the correctly themed settings
auto settings = Account::settingsWithGroup(Theme::instance()->appName());
- bool migratedCreds = false;
-
// if the settings file could not be opened, the childKeys list is empty
// then try to load settings from a very old place
if( settings->childKeys().isEmpty() ) {
qDebug() << "Migrate oC config if " << oCUrl << " == " << overrideUrl << ":"
<< (oCUrl == overrideUrl ? "Yes" : "No");
if( oCUrl == overrideUrl ) {
- migratedCreds = true;
settings.reset( oCSettings );
} else {
delete oCSettings;
// Try to load the single account.
if (!settings->childKeys().isEmpty()) {
if (auto acc = loadAccountHelper(*settings)) {
- if (migratedCreds) {
- acc->setMigrated(true);
- }
addAccount(acc);
return true;
}
: QObject(parent)
, _capabilities(QVariantMap())
, _davPath( Theme::instance()->webDavPath() )
- , _wasMigrated(false)
{
qRegisterMetaType<AccountPtr>("AccountPtr");
}
emit invalidCredentials();
}
-bool Account::wasMigrated()
-{
- return _wasMigrated;
-}
-
-void Account::setMigrated(bool mig)
-{
- _wasMigrated = mig;
-}
-
const Capabilities &Account::capabilities() const
{
return _capabilities;
QByteArray _pemCertificate;
QString _pemPrivateKey;
QString _davPath; // defaults to value from theme, might be overwritten in brandings
- bool _wasMigrated;
friend class AccountManager;
};