Improve locale.gen file parser.
This commit is contained in:
parent
f77abbc1e6
commit
1b1d78cf51
@ -246,13 +246,18 @@ LocalePage::init( const QString& initialRegion,
|
||||
}
|
||||
foreach ( QByteArray line, ba.split( '\n' ) )
|
||||
{
|
||||
if ( line.startsWith( "# " ) || line.simplified() == "#" )
|
||||
if ( line.startsWith( "## " ) ||
|
||||
line.startsWith( "# " ) ||
|
||||
line.simplified() == "#" )
|
||||
continue;
|
||||
|
||||
QString lineString = QString::fromLatin1( line.simplified() );
|
||||
|
||||
if ( lineString.startsWith( "#" ) )
|
||||
lineString.remove( '#' );
|
||||
lineString = lineString.simplified();
|
||||
|
||||
if ( lineString.isEmpty() )
|
||||
continue;
|
||||
|
||||
m_localeGenLines.append( lineString );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user