Address PR feedback.
authorCamila Ayres <hello@camilasan.com>
Thu, 17 Oct 2024 19:04:56 +0000 (21:04 +0200)
committerCamila Ayres <hello@camilasan.com>
Thu, 31 Oct 2024 12:06:03 +0000 (13:06 +0100)
Signed-off-by: Camila Ayres <hello@camilasan.com>
src/gui/generalsettings.cpp
src/gui/settingsdialog.cpp

index 57936b7182c88fc2215ef40a076dcbac50f99744..d9fcbefe284cd77f8b3e71b8d2a8aec21aa563d1 100644 (file)
@@ -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);
     }
 }
index 429808d66ee1ac3b3703744ec65e907d59676e5a..261526e11ac2767295169ddb5bb04b7f9e892ebb 100644 (file)
@@ -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());
     }