Replace old for-loops with range-based for-loops

This commit is contained in:
Gianluca Recchia 2018-10-27 23:54:57 +02:00
parent 4876beabed
commit 4ac1601696
No known key found for this signature in database
GPG key ID: 3C2B4128D9A1F218
4 changed files with 8 additions and 9 deletions

View file

@ -146,8 +146,8 @@ void ApplicationSettingsWidget::loadSettings()
m_generalUi->languageComboBox->clear();
QList<QPair<QString, QString>> languages = Translator::availableLanguages();
for (int i = 0; i < languages.size(); i++) {
m_generalUi->languageComboBox->addItem(languages[i].second, languages[i].first);
for (const auto& language : languages) {
m_generalUi->languageComboBox->addItem(language.second, language.first);
}
int defaultIndex = m_generalUi->languageComboBox->findData(config()->get("GUI/Language"));
if (defaultIndex > 0) {