diff options
Diffstat (limited to 'libkmime/kmime_header_parsing.cpp')
-rw-r--r-- | libkmime/kmime_header_parsing.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/libkmime/kmime_header_parsing.cpp b/libkmime/kmime_header_parsing.cpp index 6b06c9038..cf825a16a 100644 --- a/libkmime/kmime_header_parsing.cpp +++ b/libkmime/kmime_header_parsing.cpp @@ -19,11 +19,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this library with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -207,7 +207,7 @@ bool parseEncodedWord( const char* & scursor, const char * const send, // try if there's a (text)codec for the charset found: bool matchOK = false; - QTextCodec + TQTextCodec *textCodec = KGlobal::charsets()->codecForName( maybeCharset, matchOK ); if ( !matchOK || !textCodec ) { @@ -253,7 +253,7 @@ static inline void eatWhiteSpace( const char* & scursor, const char * const send bool parseAtom( const char * & scursor, const char * const send, TQString & result, bool allow8Bit ) { - QPair<const char*,int> maybeResult; + TQPair<const char*,int> maybeResult; if ( parseAtom( scursor, send, maybeResult, allow8Bit ) ) { result += TQString::tqfromLatin1( maybeResult.first, maybeResult.second ); @@ -264,7 +264,7 @@ bool parseAtom( const char * & scursor, const char * const send, } bool parseAtom( const char * & scursor, const char * const send, - QPair<const char*,int> & result, bool allow8Bit ) { + TQPair<const char*,int> & result, bool allow8Bit ) { bool success = false; const char * start = scursor; @@ -293,7 +293,7 @@ bool parseAtom( const char * & scursor, const char * const send, bool parseToken( const char * & scursor, const char * const send, TQString & result, bool allow8Bit ) { - QPair<const char*,int> maybeResult; + TQPair<const char*,int> maybeResult; if ( parseToken( scursor, send, maybeResult, allow8Bit ) ) { result += TQString::tqfromLatin1( maybeResult.first, maybeResult.second ); @@ -304,7 +304,7 @@ bool parseToken( const char * & scursor, const char * const send, } bool parseToken( const char * & scursor, const char * const send, - QPair<const char*,int> & result, bool allow8Bit ) + TQPair<const char*,int> & result, bool allow8Bit ) { bool success = false; const char * start = scursor; @@ -466,7 +466,7 @@ bool parseComment( const char* & scursor, const char * const send, result += cmntPart; if ( commentNestingDepth > 1 ) // don't add the outermost ')'... result += TQChar(')'); - maybeCmnt = TQString::null; + maybeCmnt = TQString(); } afterLastClosingParenPos = scursor; --commentNestingDepth; @@ -527,7 +527,7 @@ bool parsePhrase( const char* & scursor, const char * const send, } break; case '"': // quoted-string - tmp = TQString::null; + tmp = TQString(); if ( parseGenericQuotedString( scursor, send, tmp, isCRLF, '"', '"' ) ) { successfullyParsed = scursor; assert( *(scursor-1) == '"' ); @@ -562,7 +562,7 @@ bool parsePhrase( const char* & scursor, const char * const send, break; case '(': // comment // parse it, but ignore content: - tmp = TQString::null; + tmp = TQString(); if ( parseComment( scursor, send, tmp, isCRLF, false /*don't bother with the content*/ ) ) { successfullyParsed = scursor; @@ -577,7 +577,7 @@ bool parsePhrase( const char* & scursor, const char * const send, } break; case '=': // encoded-word - tmp = TQString::null; + tmp = TQString(); oldscursor = scursor; lang = 0; if ( parseEncodedWord( scursor, send, tmp, lang ) ) { @@ -605,7 +605,7 @@ bool parsePhrase( const char* & scursor, const char * const send, // fall though... default: //atom - tmp = TQString::null; + tmp = TQString(); scursor--; if ( parseAtom( scursor, send, tmp, true /* allow 8bit */ ) ) { successfullyParsed = scursor; @@ -775,14 +775,14 @@ bool parseObsRoute( const char* & scursor, const char* const send, // empty entry: if ( *scursor == ',' ) { scursor++; - if ( save ) result.append( TQString::null ); + if ( save ) result.append( TQString() ); continue; } // empty entry ending the list: if ( *scursor == ':' ) { scursor++; - if ( save ) result.append( TQString::null ); + if ( save ) result.append( TQString() ); return true; } @@ -834,7 +834,7 @@ bool parseAddrSpec( const char* & scursor, const char * const send, break; case '"': // quoted-string - tmp = TQString::null; + tmp = TQString(); if ( parseGenericQuotedString( scursor, send, tmp, isCRLF, '"', '"' ) ) maybeLocalPart += tmp; else @@ -843,7 +843,7 @@ bool parseAddrSpec( const char* & scursor, const char * const send, default: // atom scursor--; // re-set scursor to point to ch again - tmp = TQString::null; + tmp = TQString(); if ( parseAtom( scursor, send, tmp, false /* no 8bit */ ) ) maybeLocalPart += tmp; else @@ -926,7 +926,7 @@ bool parseMailbox( const char* & scursor, const char * const send, // first, try if it's a vanilla addr-spec: const char * oldscursor = scursor; if ( parseAddrSpec( scursor, send, maybeAddrSpec, isCRLF ) ) { - result.displayName = TQString::null; + result.displayName = TQString(); result.addrSpec = maybeAddrSpec; return true; } @@ -936,7 +936,7 @@ bool parseMailbox( const char* & scursor, const char * const send, TQString maybeDisplayName; if ( !parsePhrase( scursor, send, maybeDisplayName, isCRLF ) ) { // failed: reset cursor, note absent display-name - maybeDisplayName = TQString::null; + maybeDisplayName = TQString(); scursor = oldscursor; } else { // succeeded: eat CFWS @@ -1025,7 +1025,7 @@ bool parseAddress( const char* & scursor, const char * const send, const char * oldscursor = scursor; if ( parseMailbox( scursor, send, maybeMailbox, isCRLF ) ) { // yes, it is: - result.displayName = TQString::null; + result.displayName = TQString(); result.mailboxList.append( maybeMailbox ); return true; } @@ -1070,7 +1070,7 @@ static TQString asteriskZero = TQString::tqfromLatin1("*0*",2); //static TQString asteriskZeroAsterisk = TQString::tqfromLatin1("*0*",3); bool parseParameter( const char* & scursor, const char * const send, - QPair<TQString,QStringOrQPair> & result, bool isCRLF ) { + TQPair<TQString,TQStringOrTQPair> & result, bool isCRLF ) { // parameter = regular-parameter / extended-parameter // regular-parameter = regular-parameter-name "=" value // extended-parameter = @@ -1104,7 +1104,7 @@ bool parseParameter( const char* & scursor, const char * const send, "Chopping away \"*\"." << endl; maybeAttribute.truncate( maybeAttribute.length() - 1 ); } - result = qMakePair( maybeAttribute.lower(), QStringOrQPair() ); + result = qMakePair( maybeAttribute.lower(), TQStringOrTQPair() ); return true; } @@ -1113,7 +1113,7 @@ bool parseParameter( const char* & scursor, const char * const send, // // parse the parameter value: // - QStringOrQPair maybeValue; + TQStringOrTQPair maybeValue; if ( *scursor == '"' ) { // value is a quoted-string: scursor++; @@ -1128,14 +1128,14 @@ bool parseParameter( const char* & scursor, const char * const send, if ( !parseGenericQuotedString( scursor, send, maybeValue.qstring, isCRLF ) ) { scursor = oldscursor; - result = qMakePair( maybeAttribute.lower(), QStringOrQPair() ); + result = qMakePair( maybeAttribute.lower(), TQStringOrTQPair() ); return false; // this case needs further processing by upper layers!! } } else { // value is a token: if ( !parseToken( scursor, send, maybeValue.qpair, false /* no 8bit */ ) ) { scursor = oldscursor; - result = qMakePair( maybeAttribute.lower(), QStringOrQPair() ); + result = qMakePair( maybeAttribute.lower(), TQStringOrTQPair() ); return false; // this case needs further processing by upper layers!! } } @@ -1147,7 +1147,7 @@ bool parseParameter( const char* & scursor, const char * const send, bool parseRawParameterList( const char* & scursor, const char * const send, - TQMap<TQString,QStringOrQPair> & result, + TQMap<TQString,TQStringOrTQPair> & result, bool isCRLF ) { // we use parseParameter() consecutively to obtain a map of raw // attributes to raw values. "Raw" here means that we don't do @@ -1166,7 +1166,7 @@ bool parseRawParameterList( const char* & scursor, const char * const send, // empty list entry: ignore. if ( *scursor == ';' ) { scursor++; continue; } - QPair<TQString,QStringOrQPair> maybeParameter; + TQPair<TQString,TQStringOrTQPair> maybeParameter; if ( !parseParameter( scursor, send, maybeParameter, isCRLF ) ) { // we need to do a bit of work if the attribute is not // NULL. These are the cases marked with "needs further @@ -1201,7 +1201,7 @@ bool parseRawParameterList( const char* & scursor, const char * const send, static void decodeRFC2231Value( Codec* & rfc2231Codec, TQTextCodec* & textcodec, bool isContinuation, TQString & value, - QPair<const char*,int> & source ) { + TQPair<const char*,int> & source ) { // // parse the raw value into (charset,language,text): @@ -1297,7 +1297,7 @@ static void decodeRFC2231Value( Codec* & rfc2231Codec, bool parseParameterList( const char* & scursor, const char * const send, TQMap<TQString,TQString> & result, bool isCRLF ) { // parse the list into raw attribute-value pairs: - TQMap<TQString,QStringOrQPair> rawParameterList; + TQMap<TQString,TQStringOrTQPair> rawParameterList; if (!parseRawParameterList( scursor, send, rawParameterList, isCRLF ) ) return false; @@ -1314,7 +1314,7 @@ bool parseParameterList( const char* & scursor, const char * const send, TQString value; enum Modes { NoMode = 0x0, Continued = 0x1, Encoded = 0x2 } mode; - TQMapIterator<TQString,QStringOrQPair> it, end = rawParameterList.end(); + TQMapIterator<TQString,TQStringOrTQPair> it, end = rawParameterList.end(); for ( it = rawParameterList.begin() ; it != end ; ++it ) { if ( attribute.isNull() || !it.key().startsWith( attribute ) ) { @@ -1325,7 +1325,7 @@ bool parseParameterList( const char* & scursor, const char * const send, // store the last attribute/value pair in the result map now: if ( !attribute.isNull() ) result.insert( attribute, value ); // and extract the information from the new raw attribute: - value = TQString::null; + value = TQString(); attribute = it.key(); mode = NoMode; // is the value encoded? @@ -1361,7 +1361,7 @@ bool parseParameterList( const char* & scursor, const char * const send, // save result already: result.insert( attribute, value ); // force begin of a new attribute: - attribute = TQString::null; + attribute = TQString(); } } else /* it.key().startsWith( attribute ) */ { // @@ -1491,7 +1491,7 @@ static bool parseAlphaNumericTimeZone( const char* & scursor, long int & secsEastOfGMT, bool & timeZoneKnown ) { - QPair<const char*,int> maybeTimeZone(0,0); + TQPair<const char*,int> maybeTimeZone(0,0); if ( !parseToken( scursor, send, maybeTimeZone, false /*no 8bit*/ ) ) return false; for ( int i = 0 ; i < timeZonesLen ; ++i ) |