diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
commit | 937b2991d8e78166eea904c80ad04d34607017a4 (patch) | |
tree | 2accb8161eab09df5d7a5484ea9ea080ad123168 /kopete/plugins/latex/latexplugin.cpp | |
parent | dba26cb985af370c33d1767037851705cc561726 (diff) | |
download | tdenetwork-937b2991d8e78166eea904c80ad04d34607017a4.tar.gz tdenetwork-937b2991d8e78166eea904c80ad04d34607017a4.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/plugins/latex/latexplugin.cpp')
-rw-r--r-- | kopete/plugins/latex/latexplugin.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/kopete/plugins/latex/latexplugin.cpp b/kopete/plugins/latex/latexplugin.cpp index 61fab8a6..75ccdaf9 100644 --- a/kopete/plugins/latex/latexplugin.cpp +++ b/kopete/plugins/latex/latexplugin.cpp @@ -101,7 +101,7 @@ void LatexPlugin::slotMessageAboutToShow( Kopete::Message& msg ) } TQString messageText = msg.plainBody(); - if( !messageText.tqcontains("$$")) + if( !messageText.contains("$$")) return; //kdDebug() << k_funcinfo << " Using converter: " << m_convScript << endl; @@ -132,7 +132,7 @@ void LatexPlugin::slotMessageAboutToShow( Kopete::Message& msg ) if(!securityCheck(formul)) continue; - TQString fileName=handleLatex(formul.tqreplace("$$","")); + TQString fileName=handleLatex(formul.replace("$$","")); // get the image and encode it with base64 #if ENCODED_IMAGE_MODE @@ -167,8 +167,8 @@ void LatexPlugin::slotMessageAboutToShow( Kopete::Message& msg ) continue; imagePxWidth = theImage.width(); imagePxHeight = theImage.height(); - TQString escapedLATEX=TQStyleSheet::escape(it.key()).tqreplace("\"","""); //we need the escape quotes because that string will be in a title="" argument, but not the \n - messageText.tqreplace(Kopete::Message::escape(it.key()), " <img width=\"" + TQString::number(imagePxWidth) + "\" height=\"" + TQString::number(imagePxHeight) + "\" src=\"" + (*it) + "\" alt=\"" + escapedLATEX +"\" title=\"" + escapedLATEX +"\" /> "); + TQString escapedLATEX=TQStyleSheet::escape(it.key()).replace("\"","""); //we need the escape quotes because that string will be in a title="" argument, but not the \n + messageText.replace(Kopete::Message::escape(it.key()), " <img width=\"" + TQString::number(imagePxWidth) + "\" height=\"" + TQString::number(imagePxHeight) + "\" src=\"" + (*it) + "\" alt=\"" + escapedLATEX +"\" title=\"" + escapedLATEX +"\" /> "); } msg.setBody( messageText, Kopete::Message::RichText ); @@ -187,7 +187,7 @@ void LatexPlugin::slotMessageAboutToSend( Kopete::Message& msg) return; TQString messageText = msg.plainBody(); - if( !messageText.tqcontains("$$")) + if( !messageText.contains("$$")) return; /* if( msg.from()->protocol()->pluginId()!="MSNProtocol" ) return;*/ @@ -206,7 +206,7 @@ void LatexPlugin::slotMessageAboutToSend( Kopete::Message& msg) if(!url.isNull()) { - TQString escapedLATEX= TQStyleSheet::escape(messageText).tqreplace("\"","""); + TQString escapedLATEX= TQStyleSheet::escape(messageText).replace("\"","""); TQString messageText="<img src=\"" + url + "\" alt=\"" + escapedLATEX + "\" title=\"" + escapedLATEX +"\" />"; msg.setBody( messageText, Kopete::Message::RichText ); } @@ -241,7 +241,7 @@ TQString LatexPlugin::handleLatex(const TQString &latexFormula) bool LatexPlugin::securityCheck(const TQString &latexFormula) { - return !latexFormula.tqcontains(TQRegExp("\\\\(def|let|futurelet|newcommand|renewcomment|else|fi|write|input|include" + return !latexFormula.contains(TQRegExp("\\\\(def|let|futurelet|newcommand|renewcomment|else|fi|write|input|include" "|chardef|catcode|makeatletter|noexpand|toksdef|every|errhelp|errorstopmode|scrollmode|nonstopmode|batchmode" "|read|csname|newhelp|relax|afterground|afterassignment|expandafter|noexpand|special|command|loop|repeat|toks" "|output|line|mathcode|name|item|section|mbox|DeclareRobustCommand)[^a-zA-Z]")); |