Settings: Add debug output #3820

This commit is contained in:
Christian Kamm 2015-09-17 13:48:05 +02:00
parent 38eaf241fa
commit 68947525a0
2 changed files with 9 additions and 1 deletions

View file

@ -130,6 +130,9 @@ void AccountManager::save(bool saveCredentials)
save(acc->account(), *settings, saveCredentials); save(acc->account(), *settings, saveCredentials);
settings->endGroup(); settings->endGroup();
} }
settings->sync();
qDebug() << "Saved all account settings, status:" << settings->status();
} }
void AccountManager::wantsAccountSavedSlot(AccountPtr a) void AccountManager::wantsAccountSavedSlot(AccountPtr a)
@ -139,6 +142,9 @@ void AccountManager::wantsAccountSavedSlot(AccountPtr a)
settings->beginGroup(a->id()); settings->beginGroup(a->id());
save(a, *settings, false); // don't save credentials they might not have been loaded yet save(a, *settings, false); // don't save credentials they might not have been loaded yet
settings->endGroup(); settings->endGroup();
settings->sync();
qDebug() << "Saved account settings, status:" << settings->status();
} }
void AccountManager::save(const AccountPtr& acc, QSettings& settings, bool saveCredentials) void AccountManager::save(const AccountPtr& acc, QSettings& settings, bool saveCredentials)
@ -161,7 +167,6 @@ void AccountManager::save(const AccountPtr& acc, QSettings& settings, bool saveC
if (acc->_settingsMap.contains(httpUserC)) if (acc->_settingsMap.contains(httpUserC))
settings.setValue(userC, acc->_settingsMap.value(httpUserC)); settings.setValue(userC, acc->_settingsMap.value(httpUserC));
} }
settings.sync();
// Save accepted certificates. // Save accepted certificates.
settings.beginGroup(QLatin1String("General")); settings.beginGroup(QLatin1String("General"));

View file

@ -693,6 +693,9 @@ void Folder::saveToSettings() const
auto settings = _accountState->settings(); auto settings = _accountState->settings();
settings->beginGroup(QLatin1String("Folders")); settings->beginGroup(QLatin1String("Folders"));
FolderDefinition::save(*settings, _definition); FolderDefinition::save(*settings, _definition);
settings->sync();
qDebug() << "Saved folder" << _definition.alias << "to settings, status" << settings->status();
} }
void Folder::removeFromSettings() const void Folder::removeFromSettings() const