From 1b7badb85b86dbf70664fd160576a00bc86b8922 Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Mon, 10 Aug 2020 23:17:51 +1000 Subject: [PATCH] fixed shadowed variable issue --- .../preferences/tabs/preferencesappearancetab.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/app/dialog/preferences/tabs/preferencesappearancetab.cpp b/app/dialog/preferences/tabs/preferencesappearancetab.cpp index 1326edcd3..737821e48 100644 --- a/app/dialog/preferences/tabs/preferencesappearancetab.cpp +++ b/app/dialog/preferences/tabs/preferencesappearancetab.cpp @@ -46,13 +46,15 @@ PreferencesAppearanceTab::PreferencesAppearanceTab() style_combobox_ = new QComboBox(); - const QMap& themes = StyleManager::available_themes(); - QMap::const_iterator i; - for (i=themes.cbegin(); i!=themes.cend(); i++) { - style_combobox_->addItem(i.value(), i.key()); + { + const QMap& themes = StyleManager::available_themes(); + QMap::const_iterator i; + for (i=themes.cbegin(); i!=themes.cend(); i++) { + style_combobox_->addItem(i.value(), i.key()); - if (StyleManager::GetStyle() == i.key()) { - style_combobox_->setCurrentIndex(style_combobox_->count()-1); + if (StyleManager::GetStyle() == i.key()) { + style_combobox_->setCurrentIndex(style_combobox_->count()-1); + } } }