locale: Move the string processing out of the loop.
This commit is contained in:
parent
88dfd7fa10
commit
b79618aa15
@ -298,10 +298,11 @@ LocalePage::guessLCLocale()
|
||||
if ( m_localeGenLines.isEmpty() )
|
||||
return "en_US.UTF-8 UTF-8";
|
||||
|
||||
QString myLanguage = myLocale.name().split( '_' ).first();
|
||||
QStringList linesForLanguage;
|
||||
foreach ( QString line, m_localeGenLines )
|
||||
{
|
||||
if ( line.startsWith( myLocale.name().split( '_' ).first() ) )
|
||||
if ( line.startsWith( myLanguage ) )
|
||||
linesForLanguage.append( line );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user