From 3eb582c65543524f43a50398fc2020da8391ba71 Mon Sep 17 00:00:00 2001 From: Camila Ayres Date: Thu, 17 Oct 2024 21:04:56 +0200 Subject: [PATCH] Address PR feedback. Signed-off-by: Camila Ayres --- src/gui/generalsettings.cpp | 2 +- src/gui/settingsdialog.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/generalsettings.cpp b/src/gui/generalsettings.cpp index 57936b7182c88..d9fcbefe284cd 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 429808d66ee1a..261526e11ac27 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()); }