{
QString val = stringValue( sect, name, "" );
QStringList font_values = QStringList::split( ",", val );
- if( font_values.count()<2 || font_values.count()>4 )
+ if( font_values.count()<2 || font_values.count()>5 )
return false;
QString family = font_values[0];
- bool isBold = false, isItalic = false, isOk = false;
+ bool isBold = false, isItalic = false, isUnderline = false, isOk = false;
int pSize = -1;
for( int i=1, n=font_values.count(); i<n; i++ )
{
isBold = true;
else if( !isItalic && curval=="italic" )
isItalic = true;
+ else if( !isUnderline && curval=="underline" )
+ isUnderline = true;
else if( pSize<0 )
{
pSize = curval.toInt( &isOk );
fVal = QFont( family, pSize );
fVal.setBold( isBold );
fVal.setItalic( isItalic );
+ fVal.setUnderline( isUnderline );
return true;
}
else
val.append( "Bold" );
if( f.italic() )
val.append( "Italic" );
+ if( f.underline() )
+ val.append( "Underline" );
val.append( QString( "%1" ).arg( f.pointSize() ) );
setValue( sect, name, val.join( "," ) );