diff options
Diffstat (limited to 'libkmime/kmime_headers.cpp')
-rw-r--r-- | libkmime/kmime_headers.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/libkmime/kmime_headers.cpp b/libkmime/kmime_headers.cpp index cef3f7a4c..a677cdd75 100644 --- a/libkmime/kmime_headers.cpp +++ b/libkmime/kmime_headers.cpp @@ -199,7 +199,7 @@ bool GToken::parse( const char* & scursor, const char * const send, // must not be empty: if ( scursor == send ) return false; - QPair<const char*,int> maybeToken; + TQPair<const char*,int> maybeToken; if ( !parseToken( scursor, send, maybeToken, false /* no 8bit chars */ ) ) return false; mToken = TQCString( maybeToken.first, maybeToken.second ); @@ -300,7 +300,7 @@ bool GContentType::parse( const char* & scursor, const char * const send, // type // - QPair<const char*,int> maybeMimeType; + TQPair<const char*,int> maybeMimeType; if ( !parseToken( scursor, send, maybeMimeType, false /* no 8Bit */ ) ) return false; @@ -316,7 +316,7 @@ bool GContentType::parse( const char* & scursor, const char * const send, eatCFWS( scursor, send, isCRLF ); if ( scursor == send ) return false; - QPair<const char*,int> maybeSubType; + TQPair<const char*,int> maybeSubType; if ( !parseToken( scursor, send, maybeSubType, false /* no 8bit */ ) ) return false; @@ -357,7 +357,7 @@ bool GCISTokenWithParameterList::parse( const char* & scursor, eatCFWS( scursor, send, isCRLF ); if ( scursor == send ) return false; - QPair<const char*,int> maybeToken; + TQPair<const char*,int> maybeToken; if ( !parseToken( scursor, send, maybeToken, false /* no 8Bit */ ) ) return false; @@ -463,7 +463,7 @@ bool ReturnPath::parse( const char* & scursor, const char * const send, bool isC // prepare a Null mailbox: AddrSpec emptyAddrSpec; - maybeMailbox.displayName = TQString::null; + maybeMailbox.displayName = TQString(); maybeMailbox.addrSpec = emptyAddrSpec; } else // check that there was no display-name: @@ -582,9 +582,9 @@ void AddressField::from7BitString(const TQCString &s) TQCString n; //so what do we have here ? - if(s.find( TQRegExp("*@*(*)", false, true) )!=-1) type=2; // From: foo@bar.com (John Doe) - else if(s.find( TQRegExp("*<*@*>", false, true) )!=-1) type=1; // From: John Doe <foo@bar.com> - else if(s.find( TQRegExp("*@*", false, true) )!=-1) type=0; // From: foo@bar.com + if(s.tqfind( TQRegExp("*@*(*)", false, true) )!=-1) type=2; // From: foo@bar.com (John Doe) + else if(s.tqfind( TQRegExp("*<*@*>", false, true) )!=-1) type=1; // From: John Doe <foo@bar.com> + else if(s.tqfind( TQRegExp("*@*", false, true) )!=-1) type=0; // From: foo@bar.com else { //broken From header => just decode it n_ame=decodeRFC2047String(s, &e_ncCS, defaultCS(), forceCS()); return; @@ -598,11 +598,11 @@ void AddressField::from7BitString(const TQCString &s) case 1: pos1=0; - pos2=s.find('<'); + pos2=s.tqfind('<'); if(pos2!=-1) { n=s.mid(pos1, pos2-pos1).stripWhiteSpace(); pos1=pos2+1; - pos2=s.find('>', pos1); + pos2=s.tqfind('>', pos1); if(pos2!=-1) e_mail=s.mid(pos1, pos2-pos1).stripWhiteSpace(); } @@ -611,11 +611,11 @@ void AddressField::from7BitString(const TQCString &s) case 2: pos1=0; - pos2=s.find('('); + pos2=s.tqfind('('); if(pos2!=-1) { e_mail=s.mid(pos1, pos2-pos1).stripWhiteSpace(); pos1=pos2+1; - pos2=s.find(')', pos1); + pos2=s.tqfind(')', pos1); if(pos2!=-1) n=s.mid(pos1, pos2-pos1).stripWhiteSpace(); } @@ -664,9 +664,9 @@ void AddressField::fromUnicodeString(const TQString &s, const TQCString &cs) e_ncCS=cachedCharset(cs); //so what do we have here ? - if(s.find( TQRegExp("*@*(*)", false, true) )!=-1) type=2; // From: foo@bar.com (John Doe) - else if(s.find( TQRegExp("*<*@*>", false, true) )!=-1) type=1; // From: John Doe <foo@bar.com> - else if(s.find( TQRegExp("*@*", false, true) )!=-1) type=0; // From: foo@bar.com + if(s.tqfind( TQRegExp("*@*(*)", false, true) )!=-1) type=2; // From: foo@bar.com (John Doe) + else if(s.tqfind( TQRegExp("*<*@*>", false, true) )!=-1) type=1; // From: John Doe <foo@bar.com> + else if(s.tqfind( TQRegExp("*@*", false, true) )!=-1) type=0; // From: foo@bar.com else { //broken From header => just copy it n_ame=s; return; @@ -680,11 +680,11 @@ void AddressField::fromUnicodeString(const TQString &s, const TQCString &cs) case 1: pos1=0; - pos2=s.find('<'); + pos2=s.tqfind('<'); if(pos2!=-1) { n_ame=s.mid(pos1, pos2-pos1).stripWhiteSpace(); pos1=pos2+1; - pos2=s.find('>', pos1); + pos2=s.tqfind('>', pos1); if(pos2!=-1) e_mail=s.mid(pos1, pos2-pos1).latin1(); } @@ -693,11 +693,11 @@ void AddressField::fromUnicodeString(const TQString &s, const TQCString &cs) case 2: pos1=0; - pos2=s.find('('); + pos2=s.tqfind('('); if(pos2!=-1) { e_mail=s.mid(pos1, pos2-pos1).stripWhiteSpace().latin1(); pos1=pos2+1; - pos2=s.find(')', pos1); + pos2=s.tqfind(')', pos1); if(pos2!=-1) n_ame=s.mid(pos1, pos2-pos1).stripWhiteSpace(); } @@ -831,7 +831,7 @@ void To::from7BitString(const TQCString &s) a_ddrList->setAutoDelete(true); } - KQCStringSplitter split; + KTQCStringSplitter split; split.init(s, ","); bool splitOk=split.first(); if(!splitOk) @@ -887,7 +887,7 @@ void To::fromUnicodeString(const TQString &s, const TQCString &cs) TQString To::asUnicodeString() { if(!a_ddrList) - return TQString::null; + return TQString(); TQString ret; AddressField *it=a_ddrList->first(); @@ -978,7 +978,7 @@ TQCString Newsgroups::firstGroup() { int pos=0; if(!g_roups.isEmpty()) { - pos=g_roups.find(','); + pos=g_roups.tqfind(','); if(pos==-1) return g_roups; else @@ -1134,7 +1134,7 @@ TQCString References::at(unsigned int i) } if(pos1!=-1) { - pos2=r_ef.find('>', pos1); + pos2=r_ef.tqfind('>', pos1); if(pos2!=-1) ret=r_ef.mid(pos1, pos2-pos1+1); } @@ -1154,7 +1154,7 @@ void References::append(const TQCString &s) // remove bogus references TQStringList::Iterator it = lst.begin(); while (it != lst.end()) { - if (-1==(*it).find(exp)) + if (-1==(*it).tqfind(exp)) it = lst.remove(it); else it++; @@ -1233,7 +1233,7 @@ TQString UserAgent::asUnicodeString() void ContentType::from7BitString(const TQCString &s) { - int pos=s.find(';'); + int pos=s.tqfind(';'); if(pos==-1) m_imeType=s.simplifyWhiteSpace(); @@ -1274,7 +1274,7 @@ TQString ContentType::asUnicodeString() TQCString ContentType::mediaType() { - int pos=m_imeType.find('/'); + int pos=m_imeType.tqfind('/'); if(pos==-1) return m_imeType; else @@ -1284,7 +1284,7 @@ TQCString ContentType::mediaType() TQCString ContentType::subType() { - int pos=m_imeType.find('/'); + int pos=m_imeType.tqfind('/'); if(pos==-1) return TQCString(); else @@ -1453,9 +1453,9 @@ TQCString ContentType::getParameter(const char *name) { TQCString ret; int pos1=0, pos2=0; - pos1=p_arams.find(name, 0, false); + pos1=p_arams.tqfind(name, 0, false); if(pos1!=-1) { - if( (pos2=p_arams.find(';', pos1))==-1 ) + if( (pos2=p_arams.tqfind(';', pos1))==-1 ) pos2=p_arams.length(); pos1+=strlen(name)+1; ret=p_arams.mid(pos1, pos2-pos1); @@ -1475,12 +1475,12 @@ void ContentType::setParameter(const TQCString &name, const TQCString &value, bo else param=name+"="+value; - pos1=p_arams.find(name, 0, false); + pos1=p_arams.tqfind(name, 0, false); if(pos1==-1) { p_arams+="; "+param; } else { - pos2=p_arams.find(';', pos1); + pos2=p_arams.tqfind(';', pos1); if(pos2==-1) pos2=p_arams.length(); p_arams.remove(pos1, pos2-pos1); @@ -1559,7 +1559,7 @@ void CDisposition::from7BitString(const TQCString &s) d_isp=CDattachment; else d_isp=CDinline; - int pos=s.find("filename=", 0, false); + int pos=s.tqfind("filename=", 0, false); TQCString fn; if(pos>-1) { pos+=9; @@ -1602,7 +1602,7 @@ void CDisposition::fromUnicodeString(const TQString &s, const TQCString &cs) d_isp=CDattachment; else d_isp=CDinline; - int pos=s.find("filename=", 0, false); + int pos=s.tqfind("filename=", 0, false); if(pos>-1) { pos+=9; f_ilename=s.mid(pos, s.length()-pos); |