summaryrefslogtreecommitdiffstats
path: root/kfile-plugins/mhtml/kfile_mhtml.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commit627b091fad9df13695f249588e8a58f524eda0fa (patch)
tree98ff502a8743af48d8b88996e9a494fec4110586 /kfile-plugins/mhtml/kfile_mhtml.cpp
parentf6e9c8d694be3d1df338b385125e13db41af0b1f (diff)
downloadtdeaddons-627b091fad9df13695f249588e8a58f524eda0fa.tar.gz
tdeaddons-627b091fad9df13695f249588e8a58f524eda0fa.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kfile-plugins/mhtml/kfile_mhtml.cpp')
-rw-r--r--kfile-plugins/mhtml/kfile_mhtml.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/kfile-plugins/mhtml/kfile_mhtml.cpp b/kfile-plugins/mhtml/kfile_mhtml.cpp
index 96da46e..895d969 100644
--- a/kfile-plugins/mhtml/kfile_mhtml.cpp
+++ b/kfile-plugins/mhtml/kfile_mhtml.cpp
@@ -120,21 +120,21 @@ bool mhtmlPlugin::readInfo( KFileMetaInfo& info, uint /*what*/)
}
TQString mhtmlPlugin::decodeRFC2047Phrase(const TQString &msg, bool removeLessGreater){
- int st=msg.tqfind("=?");
+ int st=msg.find("=?");
int en=-1;
TQString msgCopy=msg;
TQString decodedText=msgCopy.left(st);
TQString encodedText=msgCopy.mid(st);
- st=encodedText.tqfind("=?");
+ st=encodedText.find("=?");
while(st!=-1){
- en=encodedText.tqfind("?=");
- while(encodedText.mid(en+2,1)!=" " && en+2<(int)encodedText.length()) en=encodedText.tqfind("?=",en+1);
+ en=encodedText.find("?=");
+ while(encodedText.mid(en+2,1)!=" " && en+2<(int)encodedText.length()) en=encodedText.find("?=",en+1);
if(en==-1) break;
decodedText+=encodedText.left(st);
TQString tmp=encodedText.mid(st,en-st+2);
encodedText=encodedText.mid(en+2);
decodedText+=decodeRFC2047String(tmp);
- st=encodedText.tqfind("=?",st+1);
+ st=encodedText.find("=?",st+1);
}
decodedText += encodedText;
// remove unwanted '<' and '>'
@@ -147,12 +147,12 @@ TQString mhtmlPlugin::decodeRFC2047Phrase(const TQString &msg, bool removeLessGr
TQString dec=decodedText;
TQString tmp;
- st=decodedText.tqfind("<");
+ st=decodedText.find("<");
while(st!=-1){
- st=dec.tqfind("<",st);
+ st=dec.find("<",st);
if(st==0 || (st!=0 && (dec.mid(st-2,2)==", "))){
- en=dec.tqfind(">",st);
- if(en==-1 && dec.tqfind(",",st)<en){
+ en=dec.find(">",st);
+ if(en==-1 && dec.find(",",st)<en){
st++;
continue;
}
@@ -172,17 +172,17 @@ TQString mhtmlPlugin::decodeRFC2047String(const TQString &msg){
TQString encodedText;
TQString decodedText;
int encEnd=0;
- if(msg.startsWith("=?") && (encEnd=msg.tqfindRev("?="))!=-1){
+ if(msg.startsWith("=?") && (encEnd=msg.findRev("?="))!=-1){
notEncodedText=msg.mid(encEnd+2);
encodedText=msg.left(encEnd);
encodedText=encodedText.mid(2,encodedText.length()-2);
- int questionMark=encodedText.tqfind('?');
+ int questionMark=encodedText.find('?');
if(questionMark==-1) return msg;
charset=encodedText.left(questionMark).lower();
encoding=encodedText.mid(questionMark+1,1).lower();
if(encoding!="b" && encoding!="q") return msg;
encodedText=encodedText.mid(questionMark+3);
- if(charset.tqfind(" ")!=-1 && encodedText.tqfind(" ")!=-1) return msg;
+ if(charset.find(" ")!=-1 && encodedText.find(" ")!=-1) return msg;
TQCString tmpIn;
TQCString tmpOut;
tmpIn = encodedText.local8Bit();
@@ -192,8 +192,8 @@ TQString mhtmlPlugin::decodeRFC2047String(const TQString &msg){
TQTextCodec *codec = TQTextCodec::codecForName(charset.local8Bit());
if(!codec) return msg;
decodedText=codec->toUnicode(tmpOut);
- decodedText=decodedText.tqreplace("_"," ");
- }else decodedText=tmpOut.tqreplace("_"," ");
+ decodedText=decodedText.replace("_"," ");
+ }else decodedText=tmpOut.replace("_"," ");
return decodedText + notEncodedText;
}else return msg;
}