summaryrefslogtreecommitdiffstats
path: root/kopete/kopete/chatwindow/chatmessagepart.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/kopete/chatwindow/chatmessagepart.cpp')
-rw-r--r--kopete/kopete/chatwindow/chatmessagepart.cpp154
1 files changed, 77 insertions, 77 deletions
diff --git a/kopete/kopete/chatwindow/chatmessagepart.cpp b/kopete/kopete/chatwindow/chatmessagepart.cpp
index 379ead44..53e318bf 100644
--- a/kopete/kopete/chatwindow/chatmessagepart.cpp
+++ b/kopete/kopete/chatwindow/chatmessagepart.cpp
@@ -25,7 +25,7 @@
#include <ctime>
-// Qt includes
+// TQt includes
#include <tqclipboard.h>
#include <tqtooltip.h>
#include <tqrect.h>
@@ -88,7 +88,7 @@
#if !(KDE_IS_VERSION(3,3,90))
//From kdelibs/khtml/misc/htmltags.h
// used in ChatMessagePart::copy()
-#define ID_BLOCKQUOTE 12
+#define ID_BLOCKTQUOTE 12
#define ID_BR 14
#define ID_DD 22
#define ID_DIV 26
@@ -158,7 +158,7 @@ public:
TQValueList<Kopete::Message> allMessages;
};
-class ChatMessagePart::ToolTip : public QToolTip
+class ChatMessagePart::ToolTip : public TQToolTip
{
public:
ToolTip( ChatMessagePart *c ) : TQToolTip( c->view()->viewport() )
@@ -213,8 +213,8 @@ private:
ChatMessagePart *m_chat;
};
-ChatMessagePart::ChatMessagePart( Kopete::ChatSession *mgr, TQWidget *parent, const char *name)
- : KHTMLPart( parent, name ), d( new Private )
+ChatMessagePart::ChatMessagePart( Kopete::ChatSession *mgr, TQWidget *tqparent, const char *name)
+ : KHTMLPart( tqparent, name ), d( new Private )
{
d->manager = mgr;
@@ -231,7 +231,7 @@ ChatMessagePart::ChatMessagePart( Kopete::ChatSession *mgr, TQWidget *parent, co
// Write the template to KHTMLPart
writeTemplate();
- view()->setFocusPolicy( TQWidget::NoFocus );
+ view()->setFocusPolicy( TQ_NoFocus );
d->tt=new ToolTip( this );
@@ -263,8 +263,8 @@ ChatMessagePart::ChatMessagePart( Kopete::ChatSession *mgr, TQWidget *parent, co
d->saveAction = KStdAction::saveAs( this, TQT_SLOT(save()), actionCollection() );
d->printAction = KStdAction::print( this, TQT_SLOT(print()),actionCollection() );
d->closeAction = KStdAction::close( this, TQT_SLOT(slotCloseView()),actionCollection() );
- d->importEmoticon = new KAction( i18n( "Import Emoticon"), TQString::fromLatin1( "importemot" ), 0, this, TQT_SLOT( slotImportEmoticon() ), actionCollection() );
- d->copyURLAction = new KAction( i18n( "Copy Link Address" ), TQString::fromLatin1( "editcopy" ), 0, this, TQT_SLOT( slotCopyURL() ), actionCollection() );
+ d->importEmoticon = new KAction( i18n( "Import Emoticon"), TQString::tqfromLatin1( "importemot" ), 0, this, TQT_SLOT( slotImportEmoticon() ), actionCollection() );
+ d->copyURLAction = new KAction( i18n( "Copy Link Address" ), TQString::tqfromLatin1( "editcopy" ), 0, this, TQT_SLOT( slotCopyURL() ), actionCollection() );
// read formatting override flags
readOverrides();
@@ -289,7 +289,7 @@ void ChatMessagePart::slotScrollingTo( int /*x*/, int y )
void ChatMessagePart::slotImportEmoticon()
{
TQString emoticonString = KInputDialog::getText( i18n("Import Emoticon"),
- i18n("<qt><img src=\"%1\"><br>Insert the string for the emoticon<br>separated by space if you want multiple strings</qt>").arg( d->activeElement.getAttribute("src").string() ) );
+ i18n("<qt><img src=\"%1\"><br>Insert the string for the emoticon<br>separated by space if you want multiple strings</qt>").tqarg( d->activeElement.getAttribute("src").string() ) );
if (emoticonString.isNull() )
return;
@@ -335,7 +335,7 @@ void ChatMessagePart::slotImportEmoticon()
void ChatMessagePart::save()
{
- KFileDialog dlg( TQString::null, TQString::fromLatin1( "text/html text/plain" ), view(), "fileSaveDialog", false );
+ KFileDialog dlg( TQString(), TQString::tqfromLatin1( "text/html text/plain" ), view(), "fileSaveDialog", false );
dlg.setCaption( i18n( "Save Conversation" ) );
dlg.setOperationMode( KFileDialog::Saving );
@@ -350,7 +350,7 @@ void ChatMessagePart::save()
TQTextStream stream ( file );
stream.setEncoding(TQTextStream::UnicodeUTF8);
- if ( dlg.currentFilter() == TQString::fromLatin1( "text/plain" ) )
+ if ( dlg.currentFilter() == TQString::tqfromLatin1( "text/plain" ) )
{
TQValueList<Kopete::Message>::ConstIterator it, itEnd = d->allMessages.constEnd();
for(it = d->allMessages.constBegin(); it != itEnd; ++it)
@@ -374,7 +374,7 @@ void ChatMessagePart::save()
if ( !KIO::NetAccess::move( KURL( tempFile.name() ), saveURL ) )
{
KMessageBox::queuedMessageBox( view(), KMessageBox::Error,
- i18n("<qt>Could not open <b>%1</b> for writing.</qt>").arg( saveURL.prettyURL() ), // Message
+ i18n("<qt>Could not open <b>%1</b> for writing.</qt>").tqarg( saveURL.prettyURL() ), // Message
i18n("Error While Saving") ); //Caption
}
}
@@ -392,7 +392,7 @@ void ChatMessagePart::pageDown()
void ChatMessagePart::slotOpenURLRequest(const KURL &url, const KParts::URLArgs &/*args*/)
{
kdDebug(14000) << k_funcinfo << "url=" << url.url() << endl;
- if ( url.protocol() == TQString::fromLatin1("kopetemessage") )
+ if ( url.protocol() == TQString::tqfromLatin1("kopetemessage") )
{
Kopete::Contact *contact = d->manager->account()->contacts()[ url.host() ];
if ( contact )
@@ -437,7 +437,7 @@ void ChatMessagePart::setStyleVariant( const TQString &variantPath )
{
DOM::HTMLElement variantNode = document().getElementById( TQString::fromUtf8("mainStyle") );
if( !variantNode.isNull() )
- variantNode.setInnerText( TQString("@import url(\"%1\");").arg(variantPath) );
+ variantNode.setInnerText( TQString("@import url(\"%1\");").tqarg(variantPath) );
}
void ChatMessagePart::slotAppearanceChanged()
@@ -607,7 +607,7 @@ void ChatMessagePart::slotRefreshView()
kopeteNode.setInnerText( styleHTML() );
DOM::HTMLBodyElement bodyElement = htmlDocument().body();
- bodyElement.setBgColor( KopetePrefs::prefs()->bgColor().name() );
+ bodyElement.setBgColor( TQString(KopetePrefs::prefs()->bgColor().name()) );
}
void ChatMessagePart::keepScrolledDown()
@@ -626,15 +626,15 @@ const TQString ChatMessagePart::styleHTML() const
if( p->fontFace().pointSize() != -1 )
{
fontSize = p->fontFace().pointSize();
- fontSizeCss = TQString::fromUtf8("%1pt;").arg(fontSize);
+ fontSizeCss = TQString::fromUtf8("%1pt;").tqarg(fontSize);
}
else if( p->fontFace().pixelSize() != -1 )
{
fontSize = p->fontFace().pixelSize();
- fontSizeCss = TQString::fromUtf8("%1px;").arg(fontSize);
+ fontSizeCss = TQString::fromUtf8("%1px;").tqarg(fontSize);
}
- TQString style = TQString::fromLatin1(
+ TQString style = TQString::tqfromLatin1(
"body{background-color:%1;font-family:%2;font-size:%3;color:%4}"
"td{font-family:%5;font-size:%6;color:%7}"
"a{color:%8}a.visited{color:%9}"
@@ -642,15 +642,15 @@ const TQString ChatMessagePart::styleHTML() const
"a.KopeteDisplayName:hover{text-decoration:underline;color:inherit}"
".KopeteLink{cursor:pointer;}.KopeteLink:hover{text-decoration:underline}"
".KopeteMessageBody > p:first-child{margin:0;padding:0;display:inline;}" /* some html messages are encapsuled into a <p> */ )
- .arg( p->bgColor().name() )
- .arg( p->fontFace().family() )
- .arg( fontSizeCss )
- .arg( p->textColor().name() )
- .arg( p->fontFace().family() )
- .arg( fontSizeCss )
- .arg( p->textColor().name() )
- .arg( p->linkColor().name() )
- .arg( p->linkColor().name() );
+ .tqarg( p->bgColor().name() )
+ .tqarg( p->fontFace().family() )
+ .tqarg( fontSizeCss )
+ .tqarg( p->textColor().name() )
+ .tqarg( p->fontFace().family() )
+ .tqarg( fontSizeCss )
+ .tqarg( p->textColor().name() )
+ .tqarg( p->linkColor().name() )
+ .tqarg( p->linkColor().name() );
return style;
}
@@ -700,7 +700,7 @@ Kopete::Contact *ChatMessagePart::contactFromNode( const DOM::Node &n ) const
void ChatMessagePart::slotRightClick( const TQString &, const TQPoint &point )
{
- // look through parents until we find an Element
+ // look through tqparents until we find an Element
DOM::Node activeNode = nodeUnderMouse();
while ( !activeNode.isNull() && activeNode.nodeType() != DOM::Node::ELEMENT_NODE )
activeNode = activeNode.parentNode();
@@ -727,7 +727,7 @@ void ChatMessagePart::slotRightClick( const TQString &, const TQPoint &point )
chatWindowPopup->setItemEnabled( 1, false );
chatWindowPopup->insertSeparator();
}
- else if ( d->activeElement.tagName().lower() == TQString::fromLatin1( "a" ) )
+ else if ( d->activeElement.tagName().lower() == TQString::tqfromLatin1( "a" ) )
{
d->copyURLAction->plug( chatWindowPopup );
chatWindowPopup->insertSeparator();
@@ -755,7 +755,7 @@ TQString ChatMessagePart::textUnderMouse()
{
DOM::Node activeNode = nodeUnderMouse();
if( activeNode.nodeType() != DOM::Node::TEXT_NODE )
- return TQString::null;
+ return TQString();
DOM::Text textNode = activeNode;
TQString data = textNode.data().string();
@@ -797,15 +797,15 @@ void ChatMessagePart::slotCopyURL()
DOM::HTMLAnchorElement a = d->activeElement;
if ( !a.isNull() )
{
- TQApplication::clipboard()->setText( a.href().string(), QClipboard::Clipboard );
- TQApplication::clipboard()->setText( a.href().string(), QClipboard::Selection );
+ TQApplication::tqclipboard()->setText( a.href().string(), TQClipboard::Clipboard );
+ TQApplication::tqclipboard()->setText( a.href().string(), TQClipboard::Selection );
}
}
void ChatMessagePart::slotScrollView()
{
// NB: view()->contentsHeight() is incorrect before the view has been shown in its window.
- // Until this happens, the geometry has not been correctly calculated, so this scrollBy call
+ // Until this happens, the tqgeometry has not been correctly calculated, so this scrollBy call
// will usually scroll to the top of the view.
view()->scrollBy( 0, view()->contentsHeight() );
}
@@ -872,7 +872,7 @@ void ChatMessagePart::copy(bool justselection /* default false */)
case ID_TD: case ID_TH: case ID_HR:
case ID_OL: case ID_UL: case ID_LI:
case ID_DD: case ID_DL: case ID_DT:
- case ID_PRE: case ID_BLOCKQUOTE: case ID_DIV:
+ case ID_PRE: case ID_BLOCKTQUOTE: case ID_DIV:
if (!hasNewLine)
text += "\n";
hasNewLine = true;
@@ -902,7 +902,7 @@ void ChatMessagePart::copy(bool justselection /* default false */)
case ID_TD: case ID_TH: case ID_HR:
case ID_OL: case ID_UL: case ID_LI:
case ID_DD: case ID_DL: case ID_DT:
- case ID_PRE: case ID_BLOCKQUOTE: case ID_DIV:
+ case ID_PRE: case ID_BLOCKTQUOTE: case ID_DIV:
if (!hasNewLine)
text += "\n";
hasNewLine = true;
@@ -943,25 +943,25 @@ void ChatMessagePart::copy(bool justselection /* default false */)
disconnect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), this, TQT_SLOT( slotClearSelection()));
-#ifndef QT_NO_MIMECLIPBOARD
+#ifndef TQT_NO_MIMECLIPBOARD
if(!justselection)
{
TQTextDrag *textdrag = new TQTextDrag(text, 0L);
KMultipleDrag *drag = new KMultipleDrag( );
drag->addDragObject( textdrag );
if(!htmltext.isEmpty()) {
- htmltext.replace( TQChar( 0xa0 ), ' ' );
+ htmltext.tqreplace( TQChar( 0xa0 ), ' ' );
TQTextDrag *htmltextdrag = new TQTextDrag(htmltext, 0L);
htmltextdrag->setSubtype("html");
drag->addDragObject( htmltextdrag );
}
- TQApplication::clipboard()->setData( drag, QClipboard::Clipboard );
+ TQApplication::tqclipboard()->setData( drag, TQClipboard::Clipboard );
}
- TQApplication::clipboard()->setText( text, QClipboard::Selection );
+ TQApplication::tqclipboard()->setText( text, TQClipboard::Selection );
#else
if(!justselection)
- TQApplication::clipboard()->setText( text, QClipboard::Clipboard );
- TQApplication::clipboard()->setText( text, QClipboard::Selection );
+ TQApplication::tqclipboard()->setText( text, TQClipboard::Clipboard );
+ TQApplication::tqclipboard()->setText( text, TQClipboard::Selection );
#endif
connect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), TQT_SLOT( slotClearSelection()));
@@ -1024,10 +1024,10 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML, const
protocolIcon = KGlobal::iconLoader()->iconPath( iconName, KIcon::Small );
- nickLink=TQString::fromLatin1("<a href=\"kopetemessage://%1/?protocolId=%2&amp;accountId=%3\" class=\"KopeteDisplayName\">")
- .arg( TQStyleSheet::escape(message.from()->contactId()).replace('"',"&quot;"),
- TQStyleSheet::escape(message.from()->protocol()->pluginId()).replace('"',"&quot;"),
- TQStyleSheet::escape(message.from()->account()->accountId() ).replace('"',"&quot;"));
+ nickLink=TQString::tqfromLatin1("<a href=\"kopetemessage://%1/?protocolId=%2&amp;accountId=%3\" class=\"KopeteDisplayName\">")
+ .tqarg( TQStyleSheet::escape(message.from()->contactId()).tqreplace('"',"&quot;"),
+ TQStyleSheet::escape(message.from()->protocol()->pluginId()).tqreplace('"',"&quot;"),
+ TQStyleSheet::escape(message.from()->account()->accountId() ).tqreplace('"',"&quot;"));
}
else
{
@@ -1036,15 +1036,15 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML, const
// Replace sender (contact nick)
- resultHTML = resultHTML.replace( TQString::fromUtf8("%sender%"), nickLink+nick+"</a>" );
+ resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%sender%"), nickLink+nick+"</a>" );
// Replace time, by default display only time and display seconds(that was true means).
- resultHTML = resultHTML.replace( TQString::fromUtf8("%time%"), KGlobal::locale()->formatTime(message.timestamp().time(), true) );
+ resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%time%"), KGlobal::locale()->formatTime(message.timestamp().time(), true) );
// Replace %screenName% (contact ID)
- resultHTML = resultHTML.replace( TQString::fromUtf8("%senderScreenName%"), nickLink+TQStyleSheet::escape(contactId)+"</a>" );
+ resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%senderScreenName%"), nickLink+TQStyleSheet::escape(contactId)+"</a>" );
// Replace service name (protocol name)
- resultHTML = resultHTML.replace( TQString::fromUtf8("%service%"), TQStyleSheet::escape(service) );
+ resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%service%"), TQStyleSheet::escape(service) );
// Replace protocolIcon (sender statusIcon)
- resultHTML = resultHTML.replace( TQString::fromUtf8("%senderStatusIcon%"), TQStyleSheet::escape(protocolIcon).replace('"',"&quot;") );
+ resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%senderStatusIcon%"), TQStyleSheet::escape(protocolIcon).tqreplace('"',"&quot;") );
// 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.replace( pos , timeRegExp.cap(0).length() , timeKeyword );
+ resultHTML = resultHTML.tqreplace( 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.replace( textPos , textBackgroundRegExp.cap(0).length() , bgColor );
+ resultHTML = resultHTML.tqreplace( textPos , textBackgroundRegExp.cap(0).length() , bgColor );
}
// Replace userIconPath
@@ -1098,22 +1098,22 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML, const
else if(message.direction() == Kopete::Message::Outbound)
photoPath = TQString::fromUtf8("Outgoing/buddy_icon.png");
}
- resultHTML = resultHTML.replace(TQString::fromUtf8("%userIconPath%"), photoPath);
+ resultHTML = resultHTML.tqreplace(TQString::fromUtf8("%userIconPath%"), photoPath);
}
// Replace messages.
// Build the action message if the currentChatStyle do not have Action template.
if( message.type() == Kopete::Message::TypeAction && !d->currentChatStyle->hasActionTemplate() )
{
- kdDebug(14000) << k_funcinfo << "Map Action message to Status template. " << endl;
+ kdDebug(14000) << k_funcinfo << "Map Action message to tqStatus template. " << endl;
- TQString boldNick = TQString::fromUtf8("%1<b>%2</b></a> ").arg(nickLink,nick);
+ TQString boldNick = TQString::fromUtf8("%1<b>%2</b></a> ").tqarg(nickLink,nick);
TQString newBody = boldNick + message.parsedBody();
message.setBody(newBody, Kopete::Message::ParsedHTML );
}
// Set message direction("rtl"(Right-To-Left) or "ltr"(Left-to-right))
- resultHTML = resultHTML.replace( TQString::fromUtf8("%messageDirection%"), message.isRightToLeft() ? "rtl" : "ltr" );
+ resultHTML = resultHTML.tqreplace( 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.
@@ -1130,7 +1130,7 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML, const
// hash contactId to deterministically pick a color for the contact
int hash = 0;
for( uint f = 0; f < contactId.length(); ++f )
- hash += contactId[f].unicode() * f;
+ hash += contactId[f].tqunicode() * f;
const TQString colorName = nameColors[ hash % nameColorsLen ];
TQString lightColorName; // Do not initialize, TQColor::name() is expensive!
kdDebug(14000) << k_funcinfo << "Hash " << hash << " has color " << colorName << endl;
@@ -1149,12 +1149,12 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML, const
if ( doLight && lightColorName.isNull() )
lightColorName = TQColor( colorName ).light( light ).name();
- resultHTML = resultHTML.replace( textPos , senderColorRegExp.cap(0).length(),
+ resultHTML = resultHTML.tqreplace( 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.replace( TQString::fromUtf8("%message%"), formatMessageBody(message) );
+ resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%message%"), formatMessageBody(message) );
// TODO: %status
// resultHTML = addNickLinks( resultHTML );
@@ -1180,21 +1180,21 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML )
destinationName = remoteContact->nickName();
// Replace %chatName%, create a internal span to update it by DOM when asked.
- resultHTML = resultHTML.replace( TQString::fromUtf8("%chatName%"), TQString("<span id=\"KopeteHeaderChatNameInternal\">%1</span>").arg( formatName(d->manager->displayName()) ) );
+ resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%chatName%"), TQString("<span id=\"KopeteHeaderChatNameInternal\">%1</span>").tqarg( formatName(d->manager->displayName()) ) );
// Replace %sourceName%
- resultHTML = resultHTML.replace( TQString::fromUtf8("%sourceName%"), formatName(sourceName) );
+ resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%sourceName%"), formatName(sourceName) );
// Replace %destinationName%
- resultHTML = resultHTML.replace( TQString::fromUtf8("%destinationName%"), formatName(destinationName) );
+ resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%destinationName%"), formatName(destinationName) );
// For %timeOpened%, display the date and time (also the seconds).
- resultHTML = resultHTML.replace( TQString::fromUtf8("%timeOpened%"), KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(), true, true ) );
+ resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%timeOpened%"), KGlobal::locale()->formatDateTime( TQDateTime::tqcurrentDateTime(), true, true ) );
// Look for %timeOpened{X}%
TQRegExp timeRegExp("%timeOpened\\{([^}]*)\\}%");
int pos=0;
while( (pos=timeRegExp.search(resultHTML, pos) ) != -1 )
{
- TQString timeKeyword = formatTime( timeRegExp.cap(1), TQDateTime::currentDateTime() );
- resultHTML = resultHTML.replace( pos , timeRegExp.cap(0).length() , timeKeyword );
+ TQString timeKeyword = formatTime( timeRegExp.cap(1), TQDateTime::tqcurrentDateTime() );
+ resultHTML = resultHTML.tqreplace( pos , timeRegExp.cap(0).length() , timeKeyword );
}
// Get contact image paths
#if 0
@@ -1207,13 +1207,13 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML )
if( photoOutgoingPath.isEmpty() )
photoOutgoingPath = TQString::fromUtf8("Outgoing/buddy_icon.png");
- resultHTML = resultHTML.replace( TQString::fromUtf8("%incomingIconPath%"), photoIncomingPath);
- resultHTML = resultHTML.replace( TQString::fromUtf8("%outgoingIconPath%"), photoOutgoingPath);
+ resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%incomingIconPath%"), photoIncomingPath);
+ resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%outgoingIconPath%"), photoOutgoingPath);
#endif
TQString photoIncoming, photoOutgoing;
if( remoteContact->metaContact() && !remoteContact->metaContact()->picture().isNull() )
{
- photoIncoming = TQString("data:image/png;base64,%1").arg( remoteContact->metaContact()->picture().base64() );
+ photoIncoming = TQString("data:image/png;base64,%1").tqarg( remoteContact->metaContact()->picture().base64() );
}
else
{
@@ -1222,7 +1222,7 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML )
if( d->manager->myself()->metaContact() && !d->manager->myself()->metaContact()->picture().isNull() )
{
- photoOutgoing = TQString("data:image/png;base64,%1").arg( d->manager->myself()->metaContact()->picture().base64() );
+ photoOutgoing = TQString("data:image/png;base64,%1").tqarg( d->manager->myself()->metaContact()->picture().base64() );
}
else
{
@@ -1230,8 +1230,8 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML )
}
- resultHTML = resultHTML.replace( TQString::fromUtf8("%incomingIconPath%"), photoIncoming);
- resultHTML = resultHTML.replace( TQString::fromUtf8("%outgoingIconPath%"), photoOutgoing );
+ resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%incomingIconPath%"), photoIncoming);
+ resultHTML = resultHTML.tqreplace( TQString::fromUtf8("%outgoingIconPath%"), photoOutgoing );
}
return resultHTML;
@@ -1274,7 +1274,7 @@ TQString ChatMessagePart::formatMessageBody(const Kopete::Message &message)
formattedBody += message.getHtmlStyleAttribute();
// Affect the parsed body.
- formattedBody += TQString::fromUtf8("class=\"KopeteMessageBody\">%1</span>").arg(message.parsedBody());
+ formattedBody += TQString::fromUtf8("class=\"KopeteMessageBody\">%1</span>").tqarg(message.parsedBody());
return formattedBody;
}
@@ -1363,11 +1363,11 @@ void ChatMessagePart::writeTemplate()
"%3\n"
"</body>"
"</html>"
- ).arg( d->currentChatStyle->getStyleBaseHref() )
- .arg( formatStyleKeywords(d->currentChatStyle->getHeaderHtml()) )
- .arg( formatStyleKeywords(d->currentChatStyle->getFooterHtml()) )
- .arg( KopetePrefs::prefs()->styleVariant() )
- .arg( styleHTML() );
+ ).tqarg( d->currentChatStyle->getStyleBaseHref() )
+ .tqarg( formatStyleKeywords(d->currentChatStyle->getHeaderHtml()) )
+ .tqarg( formatStyleKeywords(d->currentChatStyle->getFooterHtml()) )
+ .tqarg( KopetePrefs::prefs()->styleVariant() )
+ .tqarg( styleHTML() );
write(xhtmlBase);
end();
#ifdef STYLE_TIMETEST