Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Kamm <mail@ckamm.de>2016-10-25 13:04:22 +0300
committerChristian Kamm <mail@ckamm.de>2016-10-25 13:05:28 +0300
commit10644d3568dc36678cf16ac422bbf5b01d8ca18d (patch)
treeac6c82a85b1dc8007a166189eeeeb79199bed7bc /src/gui/accountmanager.cpp
parent9ee31443589d591db4a51c7a17e240b778bf9f5e (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.cpp12
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);