Improve locale.gen file parser.

This commit is contained in:
Teo Mrnjavac 2016-04-01 15:30:16 +02:00
parent f77abbc1e6
commit 1b1d78cf51

View File

@ -246,13 +246,18 @@ LocalePage::init( const QString& initialRegion,
} }
foreach ( QByteArray line, ba.split( '\n' ) ) foreach ( QByteArray line, ba.split( '\n' ) )
{ {
if ( line.startsWith( "# " ) || line.simplified() == "#" ) if ( line.startsWith( "## " ) ||
line.startsWith( "# " ) ||
line.simplified() == "#" )
continue; continue;
QString lineString = QString::fromLatin1( line.simplified() ); QString lineString = QString::fromLatin1( line.simplified() );
if ( lineString.startsWith( "#" ) ) if ( lineString.startsWith( "#" ) )
lineString.remove( '#' ); lineString.remove( '#' );
lineString = lineString.simplified();
if ( lineString.isEmpty() )
continue;
m_localeGenLines.append( lineString ); m_localeGenLines.append( lineString );
} }