mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-27 17:35:37 -04:00
locale: Move the string processing out of the loop.
This commit is contained in:
parent
88dfd7fa10
commit
b79618aa15
1 changed files with 2 additions and 1 deletions
|
@ -298,10 +298,11 @@ LocalePage::guessLCLocale()
|
||||||
if ( m_localeGenLines.isEmpty() )
|
if ( m_localeGenLines.isEmpty() )
|
||||||
return "en_US.UTF-8 UTF-8";
|
return "en_US.UTF-8 UTF-8";
|
||||||
|
|
||||||
|
QString myLanguage = myLocale.name().split( '_' ).first();
|
||||||
QStringList linesForLanguage;
|
QStringList linesForLanguage;
|
||||||
foreach ( QString line, m_localeGenLines )
|
foreach ( QString line, m_localeGenLines )
|
||||||
{
|
{
|
||||||
if ( line.startsWith( myLocale.name().split( '_' ).first() ) )
|
if ( line.startsWith( myLanguage ) )
|
||||||
linesForLanguage.append( line );
|
linesForLanguage.append( line );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue