summaryrefslogtreecommitdiff
path: root/library
Unidiff
Diffstat (limited to 'library') (more/less context) (ignore whitespace changes)
-rw-r--r--library/config.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/library/config.cpp b/library/config.cpp
index e07eecb..1121cd4 100644
--- a/library/config.cpp
+++ b/library/config.cpp
@@ -529,16 +529,20 @@ void Config::read()
529} 529}
530 530
531/*! 531/*!
532 \internal 532 \internal
533*/ 533*/
534bool Config::parse( const QString &l ) 534bool Config::parse( const QString &l )
535{ 535{
536 QString line = l.stripWhiteSpace(); 536 QString line = l.stripWhiteSpace();
537
538 if ( line [0] == QChar ( '#' ))
539 return true; // ignore comments
540
537 if ( line[ 0 ] == QChar( '[' ) ) { 541 if ( line[ 0 ] == QChar( '[' ) ) {
538 QString gname = line; 542 QString gname = line;
539 gname = gname.remove( 0, 1 ); 543 gname = gname.remove( 0, 1 );
540 if ( gname[ (int)gname.length() - 1 ] == QChar( ']' ) ) 544 if ( gname[ (int)gname.length() - 1 ] == QChar( ']' ) )
541 gname = gname.remove( gname.length() - 1, 1 ); 545 gname = gname.remove( gname.length() - 1, 1 );
542 git = groups.insert( gname, ConfigGroup() ); 546 git = groups.insert( gname, ConfigGroup() );
543 } else if ( !line.isEmpty() ) { 547 } else if ( !line.isEmpty() ) {
544 if ( git == groups.end() ) 548 if ( git == groups.end() )