Skip to content

Commit

Permalink
Add {} from single line condition and extend comment.
Browse files Browse the repository at this point in the history
Signed-off-by: Camila <hello@camila.codes>
  • Loading branch information
Camila committed Aug 7, 2023
1 parent 41e4a9c commit 41e0324
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/gui/accountmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,9 @@ void AccountManager::saveAccountHelper(Account *acc, QSettings &settings, bool s
settings.setValue(QLatin1String(authTypeC), acc->_credentials->authType());

// HACK: Save http_user also as user
if (acc->_settingsMap.contains(httpUserC))
if (acc->_settingsMap.contains(httpUserC)) {
settings.setValue(userC, acc->_settingsMap.value(httpUserC));
}
}

// Save accepted certificates.
Expand Down Expand Up @@ -372,7 +373,7 @@ AccountPtr AccountManager::loadAccountHelper(QSettings &settings)
auto authType = settings.value(QLatin1String(authTypeC)).toString();

// There was an account-type saving bug when 'skip folder config' was used
// See #5408. This attempts to fix up the "dummy" authType
// See owncloud#5408. This attempts to fix up the "dummy" or empty authType
if (authType == QLatin1String(dummyAuthTypeC) || authType.isEmpty()) {
if (settings.contains(QLatin1String(httpUserC))) {
authType = httpAuthTypeC;
Expand Down Expand Up @@ -401,8 +402,9 @@ AccountPtr AccountManager::loadAccountHelper(QSettings &settings)

const auto settingsChildKeys = settings.childKeys();
for (const auto &key : settingsChildKeys) {
if (!key.startsWith(httpAuthPrefix))
if (!key.startsWith(httpAuthPrefix)) {
continue;
}
const auto newkey = QString::fromLatin1(webflowAuthPrefix).append(key.mid(5));
settings.setValue(newkey, settings.value((key)));
settings.remove(key);
Expand Down

0 comments on commit 41e0324

Please sign in to comment.