diff --git a/src/gui/generalsettings.cpp b/src/gui/generalsettings.cpp index 57936b718..d9fcbefe2 100644 --- a/src/gui/generalsettings.cpp +++ b/src/gui/generalsettings.cpp @@ -299,7 +299,7 @@ void GeneralSettings::loadUpdateChannelsList() { _ui->updateChannel->clear(); _ui->updateChannel->addItems(_currentUpdateChannelList); const auto currentUpdateChannelIndex = _currentUpdateChannelList.indexOf(cfgFile.currentUpdateChannel()); - _ui->updateChannel->setCurrentIndex(currentUpdateChannelIndex != -1? currentUpdateChannelIndex : 0); + _ui->updateChannel->setCurrentIndex(currentUpdateChannelIndex != -1 ? currentUpdateChannelIndex : 0); connect(_ui->updateChannel, &QComboBox::currentTextChanged, this, &GeneralSettings::slotUpdateChannelChanged); } } diff --git a/src/gui/settingsdialog.cpp b/src/gui/settingsdialog.cpp index 429808d66..261526e11 100644 --- a/src/gui/settingsdialog.cpp +++ b/src/gui/settingsdialog.cpp @@ -140,7 +140,8 @@ SettingsDialog::SettingsDialog(ownCloudGui *gui, QWidget *parent) _actionGroupWidgets.insert(generalAction, generalSettings); _actionGroupWidgets.insert(networkAction, networkSettings); - foreach(auto account, AccountManager::instance()->accounts()) { + const auto accountsList = AccountManager::instance()->accounts(); + for (const auto &account : accountsList) { accountAdded(account.data()); }