Commit 29e55085 authored by Ludovic Fauvet's avatar Ludovic Fauvet

Sort the languages alphabetically

parent 1dbc30f6
......@@ -38,7 +38,6 @@ LanguagePreferences::LanguagePreferences( QWidget *parent )
QDir dir( ":/ts/", "*.qm", QDir::Name | QDir::IgnoreCase, QDir::Files );
QStringList tss = dir.entryList();
m_ui.comboBoxLanguage->setInsertPolicy( QComboBox::InsertAlphabetically );
foreach ( const QString& tsFileName, tss )
{
QString localeStr;
......@@ -57,6 +56,9 @@ LanguagePreferences::LanguagePreferences( QWidget *parent )
QLocale::countryToString( locale.country() ) ), localeStr );
}
m_ui.comboBoxLanguage->addItem( "English (UnitedStates)", "en_US" );
// Sort the combobox
m_ui.comboBoxLanguage->model()->sort( 0 );
}
LanguagePreferences::~LanguagePreferences() {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment