diff options
Diffstat (limited to 'kmail/mailinglist-magic.cpp')
-rw-r--r-- | kmail/mailinglist-magic.cpp | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/kmail/mailinglist-magic.cpp b/kmail/mailinglist-magic.cpp index 4483323de..3c9efd147 100644 --- a/kmail/mailinglist-magic.cpp +++ b/kmail/mailinglist-magic.cpp @@ -25,18 +25,18 @@ static TQString check_sender(const KMMessage *message, TQString header = message->headerField( "Sender" ); if ( header.isEmpty() ) - return TQString::null; + return TQString(); if ( header.left( 6 ) == "owner-" ) { header_name = "Sender"; header_value = header; - header = header.mid( 6, header.find( '@' ) - 6 ); + header = header.mid( 6, header.tqfind( '@' ) - 6 ); } else { - int index = header.find( "-owner@ " ); + int index = header.tqfind( "-owner@ " ); if ( index == -1 ) - return TQString::null; + return TQString(); header.truncate( index ); header_name = "Sender"; @@ -52,12 +52,12 @@ static TQString check_x_beenthere(const KMMessage *message, TQString &header_value ) { TQString header = message->headerField( "X-BeenThere" ); - if ( header.isNull() || header.find( '@' ) == -1 ) - return TQString::null; + if ( header.isNull() || header.tqfind( '@' ) == -1 ) + return TQString(); header_name = "X-BeenThere"; header_value = header; - header.truncate( header.find( '@' ) ); + header.truncate( header.tqfind( '@' ) ); return header; } @@ -68,13 +68,13 @@ static TQString check_delivered_to(const KMMessage *message, { TQString header = message->headerField( "Delivered-To" ); if ( header.isNull() || header.left(13 ) != "mailing list" - || header.find( '@' ) == -1 ) - return TQString::null; + || header.tqfind( '@' ) == -1 ) + return TQString(); header_name = "Delivered-To"; header_value = header; - return header.mid( 13, header.find( '@' ) - 13 ); + return header.mid( 13, header.tqfind( '@' ) - 13 ); } /* X-Mailing-List: <?([^@]+) */ @@ -84,17 +84,17 @@ static TQString check_x_mailing_list(const KMMessage *message, { TQString header = message->headerField( "X-Mailing-List"); if ( header.isEmpty() ) - return TQString::null; + return TQString(); - if ( header.find( '@' ) < 1 ) - return TQString::null; + if ( header.tqfind( '@' ) < 1 ) + return TQString(); header_name = "X-Mailing-List"; header_value = header; if ( header[0] == '<' ) - header = header.mid(1, header.find( '@' ) - 1); + header = header.mid(1, header.tqfind( '@' ) - 1); else - header.truncate( header.find( '@' ) ); + header.truncate( header.tqfind( '@' ) ); return header; } @@ -106,15 +106,15 @@ static TQString check_list_id(const KMMessage *message, int lAnglePos, firstDotPos; TQString header = message->headerField( "List-Id" ); if ( header.isEmpty() ) - return TQString::null; + return TQString(); - lAnglePos = header.find( '<' ); + lAnglePos = header.tqfind( '<' ); if ( lAnglePos < 0 ) - return TQString::null; + return TQString(); - firstDotPos = header.find( '.', lAnglePos ); + firstDotPos = header.tqfind( '.', lAnglePos ); if ( firstDotPos < 0 ) - return TQString::null; + return TQString(); header_name = "List-Id"; header_value = header.mid( lAnglePos ); @@ -130,16 +130,16 @@ static TQString check_list_post(const KMMessage *message, { TQString header = message->headerField( "List-Post" ); if ( header.isEmpty() ) - return TQString::null; + return TQString(); - int lAnglePos = header.find( "<mailto:" ); + int lAnglePos = header.tqfind( "<mailto:" ); if ( lAnglePos < 0 ) - return TQString::null; + return TQString(); header_name = "List-Post"; header_value = header; header = header.mid( lAnglePos + 8, header.length()); - header.truncate( header.find('@') ); + header.truncate( header.tqfind('@') ); return header; } @@ -150,14 +150,14 @@ static TQString check_mailing_list(const KMMessage *message, { TQString header = message->headerField( "Mailing-List"); if ( header.isEmpty() ) - return TQString::null; + return TQString(); - if (header.left( 5 ) != "list " || header.find( '@' ) < 5 ) - return TQString::null; + if (header.left( 5 ) != "list " || header.tqfind( '@' ) < 5 ) + return TQString(); header_name = "Mailing-List"; header_value = header; - header = header.mid(5, header.find( '@' ) - 5); + header = header.mid(5, header.tqfind( '@' ) - 5); return header; } @@ -168,14 +168,14 @@ static TQString check_x_loop(const KMMessage *message, TQString &header_value ){ TQString header = message->headerField( "X-Loop"); if ( header.isEmpty() ) - return TQString::null; + return TQString(); - if (header.find( '@' ) < 2 ) - return TQString::null; + if (header.tqfind( '@' ) < 2 ) + return TQString(); header_name = "X-Loop"; header_value = header; - header.truncate(header.find( '@' )); + header.truncate(header.tqfind( '@' )); return header; } @@ -185,11 +185,11 @@ static TQString check_x_ml_name(const KMMessage *message, TQString &header_value ){ TQString header = message->headerField( "X-ML-Name"); if ( header.isEmpty() ) - return TQString::null; + return TQString(); header_name = "X-ML-Name"; header_value = header; - header.truncate(header.find( '@' )); + header.truncate(header.tqfind( '@' )); return header; } @@ -208,7 +208,7 @@ MagicDetectorFunc magic_detector[] = static const int num_detectors = sizeof (magic_detector) / sizeof (magic_detector[0]); -static QStringList +static TQStringList headerToAddress( const TQString& header ) { TQStringList addr; @@ -218,8 +218,8 @@ headerToAddress( const TQString& header ) if ( header.isEmpty() ) return addr; - while ( (start = header.find( "<", start )) != -1 ) { - if ( (end = header.find( ">", ++start ) ) == -1 ) { + while ( (start = header.tqfind( "<", start )) != -1 ) { + if ( (end = header.tqfind( ">", ++start ) ) == -1 ) { kdDebug(5006)<<k_funcinfo<<"Serious mailing list header parsing error !"<<endl; return addr; } @@ -249,16 +249,16 @@ MailingList::detect( const KMMessage *message ) return mlist; } -QString +TQString MailingList::name( const KMMessage *message, TQCString &header_name, TQString &header_value ) { TQString mlist; header_name = TQCString(); - header_value = TQString::null; + header_value = TQString(); if ( !message ) - return TQString::null; + return TQString(); for (int i = 0; i < num_detectors; i++) { mlist = magic_detector[i] (message, header_name, header_value); @@ -266,7 +266,7 @@ MailingList::name( const KMMessage *message, TQCString &header_name, return mlist; } - return TQString::null; + return TQString(); } MailingList::MailingList() @@ -379,7 +379,7 @@ MailingList::setId( const TQString& str ) mId = str; } -QString +TQString MailingList::id() const { return mId; |