From 4c6f8d69e2d1501837affb472c4eb8fec4462240 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 10 Aug 2011 06:08:18 +0000 Subject: rename the following methods: tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- libkmime/kmime_content.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'libkmime/kmime_content.cpp') diff --git a/libkmime/kmime_content.cpp b/libkmime/kmime_content.cpp index fc3af97b..eb8deb8a 100644 --- a/libkmime/kmime_content.cpp +++ b/libkmime/kmime_content.cpp @@ -85,7 +85,7 @@ void Content::setContent(TQStrList *l) void Content::setContent(const TQCString &s) { - int pos=s.tqfind("\n\n", 0); + int pos=s.find("\n\n", 0); if(pos>-1) { h_ead=s.left(++pos); //header *must* end with "\n" !! b_ody=s.mid(pos+1, s.length()-pos-1); @@ -313,9 +313,9 @@ TQCString Content::encodedContent(bool useCrLf) // add proper mime headers... if (convertNonMimeBinaries) { - h_ead.tqreplace(TQRegExp("MIME-Version: .*\\n"),""); - h_ead.tqreplace(TQRegExp("Content-Type: .*\\n"),""); - h_ead.tqreplace(TQRegExp("Content-Transfer-Encoding: .*\\n"),""); + h_ead.replace(TQRegExp("MIME-Version: .*\\n"),""); + h_ead.replace(TQRegExp("Content-Type: .*\\n"),""); + h_ead.replace(TQRegExp("Content-Transfer-Encoding: .*\\n"),""); h_ead+="MIME-Version: 1.0\n"; h_ead+=contentType(true)->as7BitString()+"\n"; h_ead+=contentTransferEncoding(true)->as7BitString()+"\n"; @@ -537,7 +537,7 @@ void Content::addContent(Content *c, bool prepend) for(Headers::Base *h=srcHdrs.first(); h; h=srcHdrs.next()) { if(h->isMimeHeader()) { //remove from this content - idx=h_eaders->tqfindRef(h); + idx=h_eaders->findRef(h); h_eaders->take(idx); //append to new content main->h_eaders->append(h); @@ -582,7 +582,7 @@ void Content::removeContent(Content *c, bool del) if(del) c_ontents->removeRef(c); else { - idx=c_ontents->tqfindRef(c); + idx=c_ontents->findRef(c); c_ontents->take(idx); } @@ -604,7 +604,7 @@ void Content::removeContent(Content *c, bool del) if(h->isMimeHeader()) { removeHeader(h->type()); //remove the old header first h_eaders->append(h); //now append the new one - idx=main->h_eaders->tqfindRef(h); + idx=main->h_eaders->findRef(h); main->h_eaders->take(idx); //remove from the old content kdDebug(5003) << "Content::removeContent(Content *c, bool del) : mime-header moved: " << h->as7BitString() << endl; @@ -652,7 +652,7 @@ void Content::toStream(TQTextStream &ts, bool scrambleFromLines) TQCString ret=encodedContent(false); if (scrambleFromLines) - ret.tqreplace(TQRegExp("\\n\\nFrom "), "\n\n>From "); + ret.replace(TQRegExp("\\n\\nFrom "), "\n\n>From "); ts << ret; } @@ -664,14 +664,14 @@ Headers::Generic* Content::getNextHeader(TQCString &head) bool folded(false); Headers::Generic *header=0; - pos1 = head.tqfind(": "); + pos1 = head.find(": "); if (pos1>-1) { //there is another header pos2=pos1+=2; //skip the name if (head[pos2]!='\n') { // check if the header is not empty while(1) { - pos2=head.tqfind("\n", pos2+1); + pos2=head.find("\n", pos2+1); if(pos2==-1 || pos2==len || ( head[pos2+1]!=' ' && head[pos2+1]!='\t') ) //break if we reach the end of the string, honor folded lines break; else @@ -684,7 +684,7 @@ Headers::Generic* Content::getNextHeader(TQCString &head) if (!folded) header = new Headers::Generic(head.left(pos1-2), this, head.mid(pos1, pos2-pos1)); else - header = new Headers::Generic(head.left(pos1-2), this, head.mid(pos1, pos2-pos1).tqreplace(TQRegExp("\\s*\\n\\s*")," ")); + header = new Headers::Generic(head.left(pos1-2), this, head.mid(pos1, pos2-pos1).replace(TQRegExp("\\s*\\n\\s*")," ")); head.remove(0,pos2+1); } @@ -816,8 +816,8 @@ int Content::lineCount() { int ret=0; if(type()==ATmimeContent) - ret+=h_ead.tqcontains('\n'); - ret+=b_ody.tqcontains('\n'); + ret+=h_ead.contains('\n'); + ret+=b_ody.contains('\n'); if(c_ontents && !c_ontents->isEmpty()) for(Content *c=c_ontents->first(); c; c=c_ontents->next()) -- cgit v1.2.3