locale: Move the string processing out of the loop.

main
Kevin Kofler 11 years ago
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…
Cancel
Save