Fix finding 'English' item in language dropdown menu when an unrecognized locale is requested. Closes #6109.

This commit is contained in:
sledgehammer999 2017-01-19 17:22:40 +02:00
parent fed325a54d
commit 7d7f82ae46
No known key found for this signature in database
GPG key ID: 6E4A2D025B7CC9A2

View file

@ -1311,7 +1311,7 @@ void OptionsDialog::setLocale(const QString &localeStr)
}
if (index < 0) {
// Unrecognized, use US English
index = m_ui->comboI18n->findData(QLocale("en").name(), Qt::UserRole);
index = m_ui->comboI18n->findData("en", Qt::UserRole);
Q_ASSERT(index >= 0);
}
m_ui->comboI18n->setCurrentIndex(index);