Log: Only print 'Saved account settings' in debug mode

Don't log that there was no error...
This commit is contained in:
Hannah von Reth 2020-07-08 15:49:27 +02:00 committed by Kevin Ottens
parent c9ee0a0343
commit e38b43123c
No known key found for this signature in database
GPG key ID: 074BBBCB8DECC9E2

View file

@ -195,26 +195,26 @@ void AccountManager::save(bool saveCredentials)
void AccountManager::saveAccount(Account *a)
{
qCInfo(lcAccountManager) << "Saving account" << a->url().toString();
qCDebug(lcAccountManager) << "Saving account" << a->url().toString();
auto settings = ConfigFile::settingsWithGroup(QLatin1String(accountsC));
settings->beginGroup(a->id());
saveAccountHelper(a, *settings, false); // don't save credentials they might not have been loaded yet
settings->endGroup();
settings->sync();
qCInfo(lcAccountManager) << "Saved account settings, status:" << settings->status();
qCDebug(lcAccountManager) << "Saved account settings, status:" << settings->status();
}
void AccountManager::saveAccountState(AccountState *a)
{
qCInfo(lcAccountManager) << "Saving account state" << a->account()->url().toString();
qCDebug(lcAccountManager) << "Saving account state" << a->account()->url().toString();
auto settings = ConfigFile::settingsWithGroup(QLatin1String(accountsC));
settings->beginGroup(a->account()->id());
a->writeToSettings(*settings);
settings->endGroup();
settings->sync();
qCInfo(lcAccountManager) << "Saved account state settings, status:" << settings->status();
qCDebug(lcAccountManager) << "Saved account state settings, status:" << settings->status();
}
void AccountManager::saveAccountHelper(Account *acc, QSettings &settings, bool saveCredentials)