Commit 00f5f6e3 authored by Laurent Montel's avatar Laurent Montel 😁

Fix duplicate code

parent 74ecbae2
...@@ -688,17 +688,14 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) ...@@ -688,17 +688,14 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
const QString body = plainToHtml( getLName( str ) ); const QString body = plainToHtml( getLName( str ) );
htmlBody.append( body ); htmlBody.append( body );
} else if ( cmd.startsWith( QLatin1String( "FULLSUBJECT" ) ) ) { } else if ( cmd.startsWith( QLatin1String( "FULLSUBJECT" ) ) || cmd.startsWith( QLatin1String( "FULLSUBJ" ) ) ) {
kDebug() << "Command: FULLSUBJECT"; if (cmd.startsWith( QLatin1String( "FULLSUBJ" )) ) {
i += strlen( "FULLSUBJECT" ); kDebug() << "Command: FULLSUBJ";
const QString str = mMsg->subject()->asUnicodeString(); i += strlen( "FULLSUBJ" );
plainBody.append( str ); } else {
const QString body = plainToHtml( str ); kDebug() << "Command: FULLSUBJECT";
htmlBody.append( body ); i += strlen( "FULLSUBJECT" );
}
} else if ( cmd.startsWith( QLatin1String( "FULLSUBJ" ) ) ) {
kDebug() << "Command: FULLSUBJ";
i += strlen( "FULLSUBJ" );
const QString str = mMsg->subject()->asUnicodeString(); const QString str = mMsg->subject()->asUnicodeString();
plainBody.append( str ); plainBody.append( str );
const QString body = plainToHtml( str ); const QString body = plainToHtml( str );
...@@ -914,19 +911,14 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) ...@@ -914,19 +911,14 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
htmlBody.append( body ); htmlBody.append( body );
} }
} else if ( cmd.startsWith( QLatin1String( "OFULLSUBJECT" ) ) ) { } else if ( cmd.startsWith( QLatin1String( "OFULLSUBJECT" ) ) || cmd.startsWith( QLatin1String( "OFULLSUBJ" ) ) ) {
kDebug() << "Command: OFULLSUBJECT"; if (cmd.startsWith( QLatin1String( "OFULLSUBJECT" ) )) {
i += strlen( "OFULLSUBJECT" ); kDebug() << "Command: OFULLSUBJECT";
if ( mOrigMsg ) { i += strlen( "OFULLSUBJECT" );
const QString str = mOrigMsg->subject()->asUnicodeString(); } else {
plainBody.append( str ); kDebug() << "Command: OFULLSUBJ";
const QString body = plainToHtml( str ); i += strlen( "OFULLSUBJ" );
htmlBody.append( body );
} }
} else if ( cmd.startsWith( QLatin1String( "OFULLSUBJ" ) ) ) {
kDebug() << "Command: OFULLSUBJ";
i += strlen( "OFULLSUBJ" );
if ( mOrigMsg ) { if ( mOrigMsg ) {
const QString str = mOrigMsg->subject()->asUnicodeString(); const QString str = mOrigMsg->subject()->asUnicodeString();
plainBody.append( str ); plainBody.append( str );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment