From 49690fc6817599c4d094d455d73175d88d6c93f0 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 28 Jan 2020 16:01:59 +0100 Subject: [PATCH] [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) --- src/modules/locale/LocaleConfiguration.cpp | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/modules/locale/LocaleConfiguration.cpp b/src/modules/locale/LocaleConfiguration.cpp index 3377b11f3..da8d4d0f3 100644 --- a/src/modules/locale/LocaleConfiguration.cpp +++ b/src/modules/locale/LocaleConfiguration.cpp @@ -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