From f4fae92b6768541e2952173c3d4b09040f95bf7e Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 16 Feb 2011 20:17:18 +0000 Subject: Moved kpilot from kdepim to applications, as the core Trinity libraries should not contain hardware-dependent software git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1221127 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- libkmime/kmime_content.cpp | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'libkmime/kmime_content.cpp') diff --git a/libkmime/kmime_content.cpp b/libkmime/kmime_content.cpp index 6eca383fa..b6b6229f0 100644 --- a/libkmime/kmime_content.cpp +++ b/libkmime/kmime_content.cpp @@ -313,9 +313,9 @@ TQCString Content::encodedContent(bool useCrLf) // add proper mime headers... if (convertNonMimeBinaries) { - h_ead.replace(TQRegExp("MIME-Version: .*\\n"),""); - h_ead.replace(TQRegExp("Content-Type: .*\\n"),""); - h_ead.replace(TQRegExp("Content-Transfer-Encoding: .*\\n"),""); + h_ead.tqreplace(TQRegExp("MIME-Version: .*\\n"),""); + h_ead.tqreplace(TQRegExp("Content-Type: .*\\n"),""); + h_ead.tqreplace(TQRegExp("Content-Transfer-Encoding: .*\\n"),""); h_ead+="MIME-Version: 1.0\n"; h_ead+=contentType(true)->as7BitString()+"\n"; h_ead+=contentTransferEncoding(true)->as7BitString()+"\n"; @@ -327,7 +327,7 @@ TQCString Content::encodedContent(bool useCrLf) e+="\n"; //body - if(!b_ody.isEmpty()) { //this message contains only one part + if(!b_ody.isEmpty()) { //this message tqcontains only one part Headers::CTEncoding *enc=contentTransferEncoding(); if(enc->needToEncode()) { @@ -439,25 +439,25 @@ void Content::decodedText(TQStringList &l, bool trimText, if(!decodeText()) //this is not a text content !! return; - TQString unicode; + TQString tqunicode; bool ok=true; TQTextCodec *codec=KGlobal::charsets()->codecForName(contentType()->charset(),ok); - unicode=codec->toUnicode(b_ody.data(), b_ody.length()); + tqunicode=codec->toUnicode(b_ody.data(), b_ody.length()); if (trimText && removeTrailingNewlines) { int i; - for (i=unicode.length()-1; i>=0; i--) - if (!unicode[i].isSpace()) + for (i=tqunicode.length()-1; i>=0; i--) + if (!tqunicode[i].isSpace()) break; - unicode.truncate(i+1); + tqunicode.truncate(i+1); } else { - if (unicode.right(1)=="\n") - unicode.truncate(unicode.length()-1); // remove trailing new-line + if (tqunicode.right(1)=="\n") + tqunicode.truncate(tqunicode.length()-1); // remove trailing new-line } - l=TQStringList::split('\n', unicode, true); //split the string at linebreaks + l=TQStringList::split('\n', tqunicode, true); //split the string at linebreaks } @@ -630,7 +630,7 @@ void Content::changeEncoding(Headers::contentEncoding e) if(decodeText()) enc->setCte(e); // text is not encoded until it's sent or saved so we just set the new encoding - else { // this content contains non textual data, that has to be re-encoded + else { // this content tqcontains non textual data, that has to be re-encoded if(e!=Headers::CEbase64) { //kdWarning(5003) << "Content::changeEncoding() : non textual data and encoding != base64 - this should not happen\n => forcing base64" << endl; @@ -652,7 +652,7 @@ void Content::toStream(TQTextStream &ts, bool scrambleFromLines) TQCString ret=encodedContent(false); if (scrambleFromLines) - ret.replace(TQRegExp("\\n\\nFrom "), "\n\n>From "); + ret.tqreplace(TQRegExp("\\n\\nFrom "), "\n\n>From "); ts << ret; } @@ -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).replace(TQRegExp("\\s*\\n\\s*")," ")); + header = new Headers::Generic(head.left(pos1-2), this, head.mid(pos1, pos2-pos1).tqreplace(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.contains('\n'); - ret+=b_ody.contains('\n'); + ret+=h_ead.tqcontains('\n'); + ret+=b_ody.tqcontains('\n'); if(c_ontents && !c_ontents->isEmpty()) for(Content *c=c_ontents->first(); c; c=c_ontents->next()) -- cgit v1.2.1