diff options
author | Christian Kamm <mail@ckamm.de> | 2016-10-25 13:04:22 +0300 |
---|---|---|
committer | Christian Kamm <mail@ckamm.de> | 2016-10-25 13:05:28 +0300 |
commit | 10644d3568dc36678cf16ac422bbf5b01d8ca18d (patch) | |
tree | ac6c82a85b1dc8007a166189eeeeb79199bed7bc /src/gui/accountmanager.cpp | |
parent | 9ee31443589d591db4a51c7a17e240b778bf9f5e (diff) |
Move concatUrl and settingsWithGroup to Utility
There was little reason to keep them cluttering Account.
Diffstat (limited to 'src/gui/accountmanager.cpp')
-rw-r--r-- | src/gui/accountmanager.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/accountmanager.cpp b/src/gui/accountmanager.cpp index 0cf8b5972..833a77969 100644 --- a/src/gui/accountmanager.cpp +++ b/src/gui/accountmanager.cpp @@ -44,7 +44,7 @@ AccountManager *AccountManager::instance() bool AccountManager::restore() { - auto settings = Account::settingsWithGroup(QLatin1String(accountsC)); + auto settings = Utility::settingsWithGroup(QLatin1String(accountsC)); // If there are no accounts, check the old format. if (settings->childGroups().isEmpty() @@ -69,7 +69,7 @@ bool AccountManager::restore() bool AccountManager::restoreFromLegacySettings() { // try to open the correctly themed settings - auto settings = Account::settingsWithGroup(Theme::instance()->appName()); + auto settings = Utility::settingsWithGroup(Theme::instance()->appName()); // if the settings file could not be opened, the childKeys list is empty // then try to load settings from a very old place @@ -120,7 +120,7 @@ bool AccountManager::restoreFromLegacySettings() void AccountManager::save(bool saveCredentials) { - auto settings = Account::settingsWithGroup(QLatin1String(accountsC)); + auto settings = Utility::settingsWithGroup(QLatin1String(accountsC)); settings->setValue(QLatin1String(versionC), 2); foreach (const auto &acc, _accounts) { settings->beginGroup(acc->account()->id()); @@ -136,7 +136,7 @@ void AccountManager::save(bool saveCredentials) void AccountManager::saveAccount(Account* a) { qDebug() << "Saving account" << a->url().toString(); - auto settings = Account::settingsWithGroup(QLatin1String(accountsC)); + auto settings = Utility::settingsWithGroup(QLatin1String(accountsC)); settings->beginGroup(a->id()); saveAccountHelper(a, *settings, false); // don't save credentials they might not have been loaded yet settings->endGroup(); @@ -148,7 +148,7 @@ void AccountManager::saveAccount(Account* a) void AccountManager::saveAccountState(AccountState* a) { qDebug() << "Saving account state" << a->account()->url().toString(); - auto settings = Account::settingsWithGroup(QLatin1String(accountsC)); + auto settings = Utility::settingsWithGroup(QLatin1String(accountsC)); settings->beginGroup(a->account()->id()); a->writeToSettings(*settings); settings->endGroup(); @@ -274,7 +274,7 @@ void AccountManager::deleteAccount(AccountState* account) auto copy = *it; // keep a reference to the shared pointer so it does not delete it just yet _accounts.erase(it); - auto settings = Account::settingsWithGroup(QLatin1String(accountsC)); + auto settings = Utility::settingsWithGroup(QLatin1String(accountsC)); settings->remove(account->account()->id()); emit accountRemoved(account); |