diff options
Diffstat (limited to 'kopete/kopete/chatwindow/chatmessagepart.cpp')
-rw-r--r-- | kopete/kopete/chatwindow/chatmessagepart.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/kopete/kopete/chatwindow/chatmessagepart.cpp b/kopete/kopete/chatwindow/chatmessagepart.cpp index e91c49fe..2f16217c 100644 --- a/kopete/kopete/chatwindow/chatmessagepart.cpp +++ b/kopete/kopete/chatwindow/chatmessagepart.cpp @@ -950,7 +950,7 @@ void ChatMessagePart::copy(bool justselection /* default false */) KMultipleDrag *drag = new KMultipleDrag( ); drag->addDragObject( textdrag ); if(!htmltext.isEmpty()) { - htmltext.tqreplace( TQChar( 0xa0 ), ' ' ); + htmltext.replace( TQChar( 0xa0 ), ' ' ); TQTextDrag *htmltextdrag = new TQTextDrag(htmltext, 0L); htmltextdrag->setSubtype("html"); drag->addDragObject( htmltextdrag ); @@ -1025,9 +1025,9 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML, const protocolIcon = KGlobal::iconLoader()->iconPath( iconName, KIcon::Small ); nickLink=TQString::tqfromLatin1("<a href=\"kopetemessage://%1/?protocolId=%2&accountId=%3\" class=\"KopeteDisplayName\">") - .tqarg( TQStyleSheet::escape(message.from()->contactId()).tqreplace('"',"""), - TQStyleSheet::escape(message.from()->protocol()->pluginId()).tqreplace('"',"""), - TQStyleSheet::escape(message.from()->account()->accountId() ).tqreplace('"',""")); + .tqarg( TQStyleSheet::escape(message.from()->contactId()).replace('"',"""), + TQStyleSheet::escape(message.from()->protocol()->pluginId()).replace('"',"""), + TQStyleSheet::escape(message.from()->account()->accountId() ).replace('"',""")); } else { @@ -1036,15 +1036,15 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML, const // Replace sender (contact nick) - resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%sender%"), nickLink+nick+"</a>" ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%sender%"), nickLink+nick+"</a>" ); // Replace time, by default display only time and display seconds(that was true means). - resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%time%"), KGlobal::locale()->formatTime(message.timestamp().time(), true) ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%time%"), KGlobal::locale()->formatTime(message.timestamp().time(), true) ); // Replace %screenName% (contact ID) - resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%senderScreenName%"), nickLink+TQStyleSheet::escape(contactId)+"</a>" ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%senderScreenName%"), nickLink+TQStyleSheet::escape(contactId)+"</a>" ); // Replace service name (protocol name) - resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%service%"), TQStyleSheet::escape(service) ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%service%"), TQStyleSheet::escape(service) ); // Replace protocolIcon (sender statusIcon) - resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%senderStatusIcon%"), TQStyleSheet::escape(protocolIcon).tqreplace('"',""") ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%senderStatusIcon%"), TQStyleSheet::escape(protocolIcon).replace('"',""") ); // Look for %time{X}% TQRegExp timeRegExp("%time\\{([^}]*)\\}%"); @@ -1052,7 +1052,7 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML, const while( (pos=timeRegExp.search(resultHTML , pos) ) != -1 ) { TQString timeKeyword = formatTime( timeRegExp.cap(1), message.timestamp() ); - resultHTML = resultHTML.tqreplace( pos , timeRegExp.cap(0).length() , timeKeyword ); + resultHTML = resultHTML.replace( pos , timeRegExp.cap(0).length() , timeKeyword ); } // Look for %textbackgroundcolor{X}% @@ -1069,7 +1069,7 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML, const int textPos=0; while( (textPos=textBackgroundRegExp.search(resultHTML, textPos) ) != -1 ) { - resultHTML = resultHTML.tqreplace( textPos , textBackgroundRegExp.cap(0).length() , bgColor ); + resultHTML = resultHTML.replace( textPos , textBackgroundRegExp.cap(0).length() , bgColor ); } // Replace userIconPath @@ -1098,7 +1098,7 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML, const else if(message.direction() == Kopete::Message::Outbound) photoPath = TQString::fromUtf8("Outgoing/buddy_icon.png"); } - resultHTML = resultHTML.tqreplace(TQString::fromUtf8("%userIconPath%"), photoPath); + resultHTML = resultHTML.replace(TQString::fromUtf8("%userIconPath%"), photoPath); } // Replace messages. @@ -1113,7 +1113,7 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML, const } // Set message direction("rtl"(Right-To-Left) or "ltr"(Left-to-right)) - resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%messageDirection%"), message.isRightToLeft() ? "rtl" : "ltr" ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%messageDirection%"), message.isRightToLeft() ? "rtl" : "ltr" ); // These colors are used for coloring nicknames. I tried to use // colors both visible on light and dark background. @@ -1149,12 +1149,12 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML, const if ( doLight && lightColorName.isNull() ) lightColorName = TQColor( colorName ).light( light ).name(); - resultHTML = resultHTML.tqreplace( textPos , senderColorRegExp.cap(0).length(), + resultHTML = resultHTML.replace( textPos , senderColorRegExp.cap(0).length(), doLight ? lightColorName : colorName ); } // Replace message at the end, maybe someone could put a Adium keyword in his message :P - resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%message%"), formatMessageBody(message) ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%message%"), formatMessageBody(message) ); // TODO: %status // resultHTML = addNickLinks( resultHTML ); @@ -1180,13 +1180,13 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML ) destinationName = remoteContact->nickName(); // Replace %chatName%, create a internal span to update it by DOM when asked. - resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%chatName%"), TQString("<span id=\"KopeteHeaderChatNameInternal\">%1</span>").tqarg( formatName(d->manager->displayName()) ) ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%chatName%"), TQString("<span id=\"KopeteHeaderChatNameInternal\">%1</span>").tqarg( formatName(d->manager->displayName()) ) ); // Replace %sourceName% - resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%sourceName%"), formatName(sourceName) ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%sourceName%"), formatName(sourceName) ); // Replace %destinationName% - resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%destinationName%"), formatName(destinationName) ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%destinationName%"), formatName(destinationName) ); // For %timeOpened%, display the date and time (also the seconds). - resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%timeOpened%"), KGlobal::locale()->formatDateTime( TQDateTime::tqcurrentDateTime(), true, true ) ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%timeOpened%"), KGlobal::locale()->formatDateTime( TQDateTime::tqcurrentDateTime(), true, true ) ); // Look for %timeOpened{X}% TQRegExp timeRegExp("%timeOpened\\{([^}]*)\\}%"); @@ -1194,7 +1194,7 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML ) while( (pos=timeRegExp.search(resultHTML, pos) ) != -1 ) { TQString timeKeyword = formatTime( timeRegExp.cap(1), TQDateTime::tqcurrentDateTime() ); - resultHTML = resultHTML.tqreplace( pos , timeRegExp.cap(0).length() , timeKeyword ); + resultHTML = resultHTML.replace( pos , timeRegExp.cap(0).length() , timeKeyword ); } // Get contact image paths #if 0 @@ -1207,8 +1207,8 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML ) if( photoOutgoingPath.isEmpty() ) photoOutgoingPath = TQString::fromUtf8("Outgoing/buddy_icon.png"); - resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%incomingIconPath%"), photoIncomingPath); - resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%outgoingIconPath%"), photoOutgoingPath); + resultHTML = resultHTML.replace( TQString::fromUtf8("%incomingIconPath%"), photoIncomingPath); + resultHTML = resultHTML.replace( TQString::fromUtf8("%outgoingIconPath%"), photoOutgoingPath); #endif TQString photoIncoming, photoOutgoing; if( remoteContact->metaContact() && !remoteContact->metaContact()->picture().isNull() ) @@ -1230,8 +1230,8 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML ) } - resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%incomingIconPath%"), photoIncoming); - resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%outgoingIconPath%"), photoOutgoing ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%incomingIconPath%"), photoIncoming); + resultHTML = resultHTML.replace( TQString::fromUtf8("%outgoingIconPath%"), photoOutgoing ); } return resultHTML; |