diff options
Diffstat (limited to 'kopete/protocols/gadu/gadurichtextformat.cpp')
-rw-r--r-- | kopete/protocols/gadu/gadurichtextformat.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/kopete/protocols/gadu/gadurichtextformat.cpp b/kopete/protocols/gadu/gadurichtextformat.cpp index 9dcdbc21..377967bc 100644 --- a/kopete/protocols/gadu/gadurichtextformat.cpp +++ b/kopete/protocols/gadu/gadurichtextformat.cpp @@ -100,9 +100,9 @@ GaduRichTextFormat::convertToHtml( const TQString& msg, unsigned int formats, vo g = (int)color->green; b = (int)color->blue; } - style += TQString(" color: rgb( %1, %2, %3 ); ").tqarg( r ).tqarg( g ).tqarg( b ); + style += TQString(" color: rgb( %1, %2, %3 ); ").arg( r ).arg( g ).arg( b ); - tmp += formatOpeningTag( TQString::tqfromLatin1("span"), TQString::tqfromLatin1("style=\"%1\"").tqarg( style ) ); + tmp += formatOpeningTag( TQString::fromLatin1("span"), TQString::fromLatin1("style=\"%1\"").arg( style ) ); opened = true; } @@ -150,8 +150,8 @@ GaduRichTextFormat::convertToGaduMessage( const Kopete::Message& message ) output->rtf.resize(0); // test first if there is any HTML formating in it - if( htmlString.find( TQString::tqfromLatin1("</span") ) > -1 ) { - TQRegExp findTags( TQString::tqfromLatin1("<span style=\"(.*)\">(.*)</span>") ); + if( htmlString.find( TQString::fromLatin1("</span") ) > -1 ) { + TQRegExp findTags( TQString::fromLatin1("<span style=\"(.*)\">(.*)</span>") ); findTags.setMinimal( true ); int pos = 0; int lastpos = 0; @@ -198,7 +198,7 @@ GaduRichTextFormat::convertToGaduMessage( const Kopete::Message& message ) return NULL; } - TQString rep = TQString("<span style=\"%1\">%2</span>" ).tqarg( styleHTML ).tqarg( replacement ); + TQString rep = TQString("<span style=\"%1\">%2</span>" ).arg( styleHTML ).arg( replacement ); htmlString.replace( findTags.pos( 0 ), rep.length(), replacement ); replacement = unescapeGaduMessage( replacement ); @@ -226,16 +226,16 @@ GaduRichTextFormat::convertToGaduMessage( const Kopete::Message& message ) void GaduRichTextFormat::parseAttributes( const TQString attribute, const TQString value ) { - if( attribute == TQString::tqfromLatin1("color") ) { + if( attribute == TQString::fromLatin1("color") ) { color.setNamedColor( value ); } - if( attribute == TQString::tqfromLatin1("font-weight") && value == TQString::tqfromLatin1("600") ) { + if( attribute == TQString::fromLatin1("font-weight") && value == TQString::fromLatin1("600") ) { rtfs.font |= GG_FONT_BOLD; } - if( attribute == TQString::tqfromLatin1("text-decoration") && value == TQString::tqfromLatin1("underline") ) { + if( attribute == TQString::fromLatin1("text-decoration") && value == TQString::fromLatin1("underline") ) { rtfs.font |= GG_FONT_UNDERLINE ; } - if( attribute == TQString::tqfromLatin1("font-style") && value == TQString::tqfromLatin1("italic") ) { + if( attribute == TQString::fromLatin1("font-style") && value == TQString::fromLatin1("italic") ) { rtfs.font |= GG_FONT_ITALIC; } } @@ -263,14 +263,14 @@ GaduRichTextFormat::insertRtf( uint position) // append font description rtfs.position = position; uint csize = rtf.size(); - if ( rtf.tqresize( csize + sizeof( gg_msg_richtext_format ) ) == FALSE ) { + if ( rtf.resize( csize + sizeof( gg_msg_richtext_format ) ) == FALSE ) { return false; }; memcpy( rtf.data() + csize, &rtfs, sizeof( rtfs ) ); // append color description, if color has changed if ( rtfs.font & GG_FONT_COLOR ) { csize = rtf.size(); - if ( rtf.tqresize( csize + sizeof( gg_msg_richtext_color ) ) == FALSE ) { + if ( rtf.resize( csize + sizeof( gg_msg_richtext_color ) ) == FALSE ) { return false; }; memcpy( rtf.data() + csize, &rtcs, sizeof( rtcs ) ); @@ -282,10 +282,10 @@ GaduRichTextFormat::insertRtf( uint position) TQString GaduRichTextFormat::escapeBody( TQString& input ) { - input.replace( '<', TQString::tqfromLatin1("<") ); - input.replace( '>', TQString::tqfromLatin1(">") ); - input.replace( '\n', TQString::tqfromLatin1( "<br />" ) ); - input.replace( '\t', TQString::tqfromLatin1( " " ) ); - input.replace( TQRegExp( TQString::tqfromLatin1( "\\s\\s" ) ), TQString::tqfromLatin1( " " ) ); + input.replace( '<', TQString::fromLatin1("<") ); + input.replace( '>', TQString::fromLatin1(">") ); + input.replace( '\n', TQString::fromLatin1( "<br />" ) ); + input.replace( '\t', TQString::fromLatin1( " " ) ); + input.replace( TQRegExp( TQString::fromLatin1( "\\s\\s" ) ), TQString::fromLatin1( " " ) ); return input; } |