[locale] Remove superfluous code
- the list is already filtered for UTF-8, so this is redundant - this *incidentally* fixes the problem with Assamese and Asturian, since Assamese (as_IN) was having its only entry removed, after which it would match Asturian (ast_ES)
This commit is contained in:
parent
97f622e094
commit
49690fc681
@ -71,23 +71,6 @@ LocaleConfiguration::fromLanguageAndLocation( const QString& languageLocale,
|
||||
{
|
||||
lang = linesForLanguage.first();
|
||||
}
|
||||
else
|
||||
{
|
||||
QStringList linesForLanguageUtf;
|
||||
// FIXME: this might be useless if we already filter out non-UTF8 locales
|
||||
foreach ( QString line, linesForLanguage )
|
||||
{
|
||||
if ( line.contains( "UTF-8", Qt::CaseInsensitive ) || line.contains( "utf8", Qt::CaseInsensitive ) )
|
||||
{
|
||||
linesForLanguageUtf.append( line );
|
||||
}
|
||||
}
|
||||
|
||||
if ( linesForLanguageUtf.length() == 1 )
|
||||
{
|
||||
lang = linesForLanguageUtf.first();
|
||||
}
|
||||
}
|
||||
|
||||
// lang could still be empty if we found multiple locales that satisfy myLanguage
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user