summaryrefslogtreecommitdiffstats
path: root/kfile-plugins/mhtml/kfile_mhtml.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kfile-plugins/mhtml/kfile_mhtml.cpp')
-rw-r--r--kfile-plugins/mhtml/kfile_mhtml.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/kfile-plugins/mhtml/kfile_mhtml.cpp b/kfile-plugins/mhtml/kfile_mhtml.cpp
index 0a07ea9..96da46e 100644
--- a/kfile-plugins/mhtml/kfile_mhtml.cpp
+++ b/kfile-plugins/mhtml/kfile_mhtml.cpp
@@ -34,9 +34,9 @@ typedef KGenericFactory<mhtmlPlugin> mhtmlFactory;
K_EXPORT_COMPONENT_FACTORY(kfile_mhtml, mhtmlFactory( "kfile_mhtml" ))
-mhtmlPlugin::mhtmlPlugin(TQObject *parent, const char *name,
+mhtmlPlugin::mhtmlPlugin(TQObject *tqparent, const char *name,
const TQStringList &args)
- : KFilePlugin(parent, name, args)
+ : KFilePlugin(tqparent, name, args)
{
KFileMimeTypeInfo* info = addMimeTypeInfo( "application/x-mimearchive" );
KFileMimeTypeInfo::GroupInfo* group = 0L;
@@ -120,21 +120,21 @@ bool mhtmlPlugin::readInfo( KFileMetaInfo& info, uint /*what*/)
}
TQString mhtmlPlugin::decodeRFC2047Phrase(const TQString &msg, bool removeLessGreater){
- int st=msg.find("=?");
+ int st=msg.tqfind("=?");
int en=-1;
TQString msgCopy=msg;
TQString decodedText=msgCopy.left(st);
TQString encodedText=msgCopy.mid(st);
- st=encodedText.find("=?");
+ st=encodedText.tqfind("=?");
while(st!=-1){
- en=encodedText.find("?=");
- while(encodedText.mid(en+2,1)!=" " && en+2<(int)encodedText.length()) en=encodedText.find("?=",en+1);
+ en=encodedText.tqfind("?=");
+ while(encodedText.mid(en+2,1)!=" " && en+2<(int)encodedText.length()) en=encodedText.tqfind("?=",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.find("=?",st+1);
+ st=encodedText.tqfind("=?",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.find("<");
+ st=decodedText.tqfind("<");
while(st!=-1){
- st=dec.find("<",st);
+ st=dec.tqfind("<",st);
if(st==0 || (st!=0 && (dec.mid(st-2,2)==", "))){
- en=dec.find(">",st);
- if(en==-1 && dec.find(",",st)<en){
+ en=dec.tqfind(">",st);
+ if(en==-1 && dec.tqfind(",",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.findRev("?="))!=-1){
+ if(msg.startsWith("=?") && (encEnd=msg.tqfindRev("?="))!=-1){
notEncodedText=msg.mid(encEnd+2);
encodedText=msg.left(encEnd);
encodedText=encodedText.mid(2,encodedText.length()-2);
- int questionMark=encodedText.find('?');
+ int questionMark=encodedText.tqfind('?');
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.find(" ")!=-1 && encodedText.find(" ")!=-1) return msg;
+ if(charset.tqfind(" ")!=-1 && encodedText.tqfind(" ")!=-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.replace("_"," ");
- }else decodedText=tmpOut.replace("_"," ");
+ decodedText=decodedText.tqreplace("_"," ");
+ }else decodedText=tmpOut.tqreplace("_"," ");
return decodedText + notEncodedText;
}else return msg;
}