Commit 1702acd3 authored by Laurent Montel's avatar Laurent Montel 😁

Fix method name

parent 00f5f6e3
...@@ -172,7 +172,7 @@ int TemplateParser::parseQuotes( const QString &prefix, const QString &str, ...@@ -172,7 +172,7 @@ int TemplateParser::parseQuotes( const QString &prefix, const QString &str,
return len; return len;
} }
QString TemplateParser::getFName( const QString &str ) QString TemplateParser::getFirstName( const QString &str )
{ {
// simple logic: // simple logic:
// if there is ',' in name, than format is 'Last, First' // if there is ',' in name, than format is 'Last, First'
...@@ -218,7 +218,7 @@ QString TemplateParser::getFName( const QString &str ) ...@@ -218,7 +218,7 @@ QString TemplateParser::getFName( const QString &str )
return res; return res;
} }
QString TemplateParser::getLName( const QString &str ) QString TemplateParser::getLastName( const QString &str )
{ {
// simple logic: // simple logic:
// if there is ',' in name, than format is 'Last, First' // if there is ',' in name, than format is 'Last, First'
...@@ -597,8 +597,8 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) ...@@ -597,8 +597,8 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
i += strlen( "CCFNAME" ); i += strlen( "CCFNAME" );
const QString str = const QString str =
MessageCore::StringUtil::stripEmailAddr( mMsg->cc()->asUnicodeString( ) ); MessageCore::StringUtil::stripEmailAddr( mMsg->cc()->asUnicodeString( ) );
plainBody.append( getFName( str ) ); plainBody.append( getFirstName( str ) );
const QString body = plainToHtml( getFName( str ) ); const QString body = plainToHtml( getFirstName( str ) );
htmlBody.append( body ); htmlBody.append( body );
} else if ( cmd.startsWith( QLatin1String( "CCLNAME" ) ) ) { } else if ( cmd.startsWith( QLatin1String( "CCLNAME" ) ) ) {
...@@ -606,8 +606,8 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) ...@@ -606,8 +606,8 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
i += strlen( "CCLNAME" ); i += strlen( "CCLNAME" );
const QString str = const QString str =
MessageCore::StringUtil::stripEmailAddr( mMsg->cc()->asUnicodeString( ) ); MessageCore::StringUtil::stripEmailAddr( mMsg->cc()->asUnicodeString( ) );
plainBody.append( getLName( str ) ); plainBody.append( getLastName( str ) );
const QString body = plainToHtml( getLName( str ) ); const QString body = plainToHtml( getLastName( str ) );
htmlBody.append( body ); htmlBody.append( body );
} else if ( cmd.startsWith( QLatin1String( "TOADDR" ) ) ) { } else if ( cmd.startsWith( QLatin1String( "TOADDR" ) ) ) {
...@@ -632,8 +632,8 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) ...@@ -632,8 +632,8 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
i += strlen( "TOFNAME" ); i += strlen( "TOFNAME" );
const QString str = const QString str =
MessageCore::StringUtil::stripEmailAddr( mMsg->to()->asUnicodeString( ) ); MessageCore::StringUtil::stripEmailAddr( mMsg->to()->asUnicodeString( ) );
plainBody.append( getFName( str ) ); plainBody.append( getFirstName( str ) );
const QString body = plainToHtml( getFName( str ) ); const QString body = plainToHtml( getFirstName( str ) );
htmlBody.append( body ); htmlBody.append( body );
} else if ( cmd.startsWith( QLatin1String( "TOLNAME" ) ) ) { } else if ( cmd.startsWith( QLatin1String( "TOLNAME" ) ) ) {
...@@ -641,8 +641,8 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) ...@@ -641,8 +641,8 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
i += strlen( "TOLNAME" ); i += strlen( "TOLNAME" );
const QString str = const QString str =
MessageCore::StringUtil::stripEmailAddr( mMsg->to()->asUnicodeString( ) ); MessageCore::StringUtil::stripEmailAddr( mMsg->to()->asUnicodeString( ) );
plainBody.append( getLName( str ) ); plainBody.append( getLastName( str ) );
const QString body = plainToHtml( getLName( str ) ); const QString body = plainToHtml( getLastName( str ) );
htmlBody.append( body ); htmlBody.append( body );
} else if ( cmd.startsWith( QLatin1String( "TOLIST" ) ) ) { } else if ( cmd.startsWith( QLatin1String( "TOLIST" ) ) ) {
...@@ -675,8 +675,8 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) ...@@ -675,8 +675,8 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
i += strlen( "FROMFNAME" ); i += strlen( "FROMFNAME" );
const QString str = const QString str =
MessageCore::StringUtil::stripEmailAddr( mMsg->from()->asUnicodeString( ) ); MessageCore::StringUtil::stripEmailAddr( mMsg->from()->asUnicodeString( ) );
plainBody.append( getFName( str ) ); plainBody.append( getFirstName( str ) );
const QString body = plainToHtml( getFName( str ) ); const QString body = plainToHtml( getFirstName( str ) );
htmlBody.append( body ); htmlBody.append( body );
} else if ( cmd.startsWith( QLatin1String( "FROMLNAME" ) ) ) { } else if ( cmd.startsWith( QLatin1String( "FROMLNAME" ) ) ) {
...@@ -684,8 +684,8 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) ...@@ -684,8 +684,8 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
i += strlen( "FROMLNAME" ); i += strlen( "FROMLNAME" );
const QString str = const QString str =
MessageCore::StringUtil::stripEmailAddr( mMsg->from()->asUnicodeString( ) ); MessageCore::StringUtil::stripEmailAddr( mMsg->from()->asUnicodeString( ) );
plainBody.append( getLName( str ) ); plainBody.append( getLastName( str ) );
const QString body = plainToHtml( getLName( str ) ); const QString body = plainToHtml( getLastName( str ) );
htmlBody.append( body ); htmlBody.append( body );
} else if ( cmd.startsWith( QLatin1String( "FULLSUBJECT" ) ) || cmd.startsWith( QLatin1String( "FULLSUBJ" ) ) ) { } else if ( cmd.startsWith( QLatin1String( "FULLSUBJECT" ) ) || cmd.startsWith( QLatin1String( "FULLSUBJ" ) ) ) {
...@@ -789,8 +789,8 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) ...@@ -789,8 +789,8 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
if ( mOrigMsg ) { if ( mOrigMsg ) {
const QString str = const QString str =
MessageCore::StringUtil::stripEmailAddr( mOrigMsg->cc()->asUnicodeString( ) ); MessageCore::StringUtil::stripEmailAddr( mOrigMsg->cc()->asUnicodeString( ) );
plainBody.append( getFName( str ) ); plainBody.append( getFirstName( str ) );
const QString body = plainToHtml( getFName( str ) ); const QString body = plainToHtml( getFirstName( str ) );
htmlBody.append( body ); htmlBody.append( body );
} }
...@@ -800,8 +800,8 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) ...@@ -800,8 +800,8 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
if ( mOrigMsg ) { if ( mOrigMsg ) {
const QString str = const QString str =
MessageCore::StringUtil::stripEmailAddr( mOrigMsg->cc()->asUnicodeString( ) ); MessageCore::StringUtil::stripEmailAddr( mOrigMsg->cc()->asUnicodeString( ) );
plainBody.append( getLName( str ) ); plainBody.append( getLastName( str ) );
const QString body = plainToHtml( getLName( str ) ); const QString body = plainToHtml( getLastName( str ) );
htmlBody.append( body ); htmlBody.append( body );
} }
...@@ -832,8 +832,8 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) ...@@ -832,8 +832,8 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
if ( mOrigMsg ) { if ( mOrigMsg ) {
const QString str = const QString str =
MessageCore::StringUtil::stripEmailAddr( mOrigMsg->to()->asUnicodeString( ) ); MessageCore::StringUtil::stripEmailAddr( mOrigMsg->to()->asUnicodeString( ) );
plainBody.append( getFName( str ) ); plainBody.append( getFirstName( str ) );
const QString body = plainToHtml( getFName( str ) ); const QString body = plainToHtml( getFirstName( str ) );
htmlBody.append( body ); htmlBody.append( body );
} }
...@@ -843,8 +843,8 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) ...@@ -843,8 +843,8 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
if ( mOrigMsg ) { if ( mOrigMsg ) {
const QString str = const QString str =
MessageCore::StringUtil::stripEmailAddr( mOrigMsg->to()->asUnicodeString( ) ); MessageCore::StringUtil::stripEmailAddr( mOrigMsg->to()->asUnicodeString( ) );
plainBody.append( getLName( str ) ); plainBody.append( getLastName( str ) );
const QString body = plainToHtml( getLName( str ) ); const QString body = plainToHtml( getLastName( str ) );
htmlBody.append( body ); htmlBody.append( body );
} }
...@@ -895,8 +895,8 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) ...@@ -895,8 +895,8 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
if ( mOrigMsg ) { if ( mOrigMsg ) {
const QString str = const QString str =
MessageCore::StringUtil::stripEmailAddr( mOrigMsg->from()->asUnicodeString() ); MessageCore::StringUtil::stripEmailAddr( mOrigMsg->from()->asUnicodeString() );
plainBody.append( getFName( str ) ); plainBody.append( getFirstName( str ) );
const QString body = plainToHtml( getFName( str ) ); const QString body = plainToHtml( getFirstName( str ) );
htmlBody.append( body ); htmlBody.append( body );
} }
...@@ -906,8 +906,8 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) ...@@ -906,8 +906,8 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
if ( mOrigMsg ) { if ( mOrigMsg ) {
const QString str = const QString str =
MessageCore::StringUtil::stripEmailAddr( mOrigMsg->from()->asUnicodeString() ); MessageCore::StringUtil::stripEmailAddr( mOrigMsg->from()->asUnicodeString() );
plainBody.append( getLName( str ) ); plainBody.append( getLastName( str ) );
const QString body = plainToHtml( getLName( str ) ); const QString body = plainToHtml( getLastName( str ) );
htmlBody.append( body ); htmlBody.append( body );
} }
......
...@@ -230,8 +230,8 @@ public: ...@@ -230,8 +230,8 @@ public:
virtual QString pipe( const QString &cmd, const QString &buf ); virtual QString pipe( const QString &cmd, const QString &buf );
virtual QString getFName( const QString &str ); virtual QString getFirstName( const QString &str );
virtual QString getLName( const QString &str ); virtual QString getLastName( const QString &str );
bool cursorPositionWasSet() const; bool cursorPositionWasSet() const;
protected: protected:
......
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