summaryrefslogtreecommitdiffstats
path: root/kmail/mailinglist-magic.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /kmail/mailinglist-magic.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmail/mailinglist-magic.cpp')
-rw-r--r--kmail/mailinglist-magic.cpp128
1 files changed, 64 insertions, 64 deletions
diff --git a/kmail/mailinglist-magic.cpp b/kmail/mailinglist-magic.cpp
index 25b2abd0c..4483323de 100644
--- a/kmail/mailinglist-magic.cpp
+++ b/kmail/mailinglist-magic.cpp
@@ -11,21 +11,21 @@
#include <kurl.h>
#include <kdebug.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
using namespace KMail;
-typedef QString (*MagicDetectorFunc) (const KMMessage *, QCString &, QString &);
+typedef TQString (*MagicDetectorFunc) (const KMMessage *, TQCString &, TQString &);
/* Sender: (owner-([^@]+)|([^@+]-owner)@ */
-static QString check_sender(const KMMessage *message,
- QCString &header_name,
- QString &header_value )
+static TQString check_sender(const KMMessage *message,
+ TQCString &header_name,
+ TQString &header_value )
{
- QString header = message->headerField( "Sender" );
+ TQString header = message->headerField( "Sender" );
if ( header.isEmpty() )
- return QString::null;
+ return TQString::null;
if ( header.left( 6 ) == "owner-" )
{
@@ -36,7 +36,7 @@ static QString check_sender(const KMMessage *message,
} else {
int index = header.find( "-owner@ " );
if ( index == -1 )
- return QString::null;
+ return TQString::null;
header.truncate( index );
header_name = "Sender";
@@ -47,13 +47,13 @@ static QString check_sender(const KMMessage *message,
}
/* X-BeenThere: ([^@]+) */
-static QString check_x_beenthere(const KMMessage *message,
- QCString &header_name,
- QString &header_value )
+static TQString check_x_beenthere(const KMMessage *message,
+ TQCString &header_name,
+ TQString &header_value )
{
- QString header = message->headerField( "X-BeenThere" );
+ TQString header = message->headerField( "X-BeenThere" );
if ( header.isNull() || header.find( '@' ) == -1 )
- return QString::null;
+ return TQString::null;
header_name = "X-BeenThere";
header_value = header;
@@ -62,14 +62,14 @@ static QString check_x_beenthere(const KMMessage *message,
}
/* Delivered-To:: <([^@]+) */
-static QString check_delivered_to(const KMMessage *message,
- QCString &header_name,
- QString &header_value )
+static TQString check_delivered_to(const KMMessage *message,
+ TQCString &header_name,
+ TQString &header_value )
{
- QString header = message->headerField( "Delivered-To" );
+ TQString header = message->headerField( "Delivered-To" );
if ( header.isNull() || header.left(13 ) != "mailing list"
|| header.find( '@' ) == -1 )
- return QString::null;
+ return TQString::null;
header_name = "Delivered-To";
header_value = header;
@@ -78,16 +78,16 @@ static QString check_delivered_to(const KMMessage *message,
}
/* X-Mailing-List: <?([^@]+) */
-static QString check_x_mailing_list(const KMMessage *message,
- QCString &header_name,
- QString &header_value )
+static TQString check_x_mailing_list(const KMMessage *message,
+ TQCString &header_name,
+ TQString &header_value )
{
- QString header = message->headerField( "X-Mailing-List");
+ TQString header = message->headerField( "X-Mailing-List");
if ( header.isEmpty() )
- return QString::null;
+ return TQString::null;
if ( header.find( '@' ) < 1 )
- return QString::null;
+ return TQString::null;
header_name = "X-Mailing-List";
header_value = header;
@@ -99,22 +99,22 @@ static QString check_x_mailing_list(const KMMessage *message,
}
/* List-Id: [^<]* <([^.]+) */
-static QString check_list_id(const KMMessage *message,
- QCString &header_name,
- QString &header_value )
+static TQString check_list_id(const KMMessage *message,
+ TQCString &header_name,
+ TQString &header_value )
{
int lAnglePos, firstDotPos;
- QString header = message->headerField( "List-Id" );
+ TQString header = message->headerField( "List-Id" );
if ( header.isEmpty() )
- return QString::null;
+ return TQString::null;
lAnglePos = header.find( '<' );
if ( lAnglePos < 0 )
- return QString::null;
+ return TQString::null;
firstDotPos = header.find( '.', lAnglePos );
if ( firstDotPos < 0 )
- return QString::null;
+ return TQString::null;
header_name = "List-Id";
header_value = header.mid( lAnglePos );
@@ -124,17 +124,17 @@ static QString check_list_id(const KMMessage *message,
/* List-Post: <mailto:[^< ]*>) */
-static QString check_list_post(const KMMessage *message,
- QCString &header_name,
- QString &header_value )
+static TQString check_list_post(const KMMessage *message,
+ TQCString &header_name,
+ TQString &header_value )
{
- QString header = message->headerField( "List-Post" );
+ TQString header = message->headerField( "List-Post" );
if ( header.isEmpty() )
- return QString::null;
+ return TQString::null;
int lAnglePos = header.find( "<mailto:" );
if ( lAnglePos < 0 )
- return QString::null;
+ return TQString::null;
header_name = "List-Post";
header_value = header;
@@ -144,16 +144,16 @@ static QString check_list_post(const KMMessage *message,
}
/* Mailing-List: list ([^@]+) */
-static QString check_mailing_list(const KMMessage *message,
- QCString &header_name,
- QString &header_value )
+static TQString check_mailing_list(const KMMessage *message,
+ TQCString &header_name,
+ TQString &header_value )
{
- QString header = message->headerField( "Mailing-List");
+ TQString header = message->headerField( "Mailing-List");
if ( header.isEmpty() )
- return QString::null;
+ return TQString::null;
if (header.left( 5 ) != "list " || header.find( '@' ) < 5 )
- return QString::null;
+ return TQString::null;
header_name = "Mailing-List";
header_value = header;
@@ -163,15 +163,15 @@ static QString check_mailing_list(const KMMessage *message,
/* X-Loop: ([^@]+) */
-static QString check_x_loop(const KMMessage *message,
- QCString &header_name,
- QString &header_value ){
- QString header = message->headerField( "X-Loop");
+static TQString check_x_loop(const KMMessage *message,
+ TQCString &header_name,
+ TQString &header_value ){
+ TQString header = message->headerField( "X-Loop");
if ( header.isEmpty() )
- return QString::null;
+ return TQString::null;
if (header.find( '@' ) < 2 )
- return QString::null;
+ return TQString::null;
header_name = "X-Loop";
header_value = header;
@@ -180,12 +180,12 @@ static QString check_x_loop(const KMMessage *message,
}
/* X-ML-Name: (.+) */
-static QString check_x_ml_name(const KMMessage *message,
- QCString &header_name,
- QString &header_value ){
- QString header = message->headerField( "X-ML-Name");
+static TQString check_x_ml_name(const KMMessage *message,
+ TQCString &header_name,
+ TQString &header_value ){
+ TQString header = message->headerField( "X-ML-Name");
if ( header.isEmpty() )
- return QString::null;
+ return TQString::null;
header_name = "X-ML-Name";
header_value = header;
@@ -209,9 +209,9 @@ MagicDetectorFunc magic_detector[] =
static const int num_detectors = sizeof (magic_detector) / sizeof (magic_detector[0]);
static QStringList
-headerToAddress( const QString& header )
+headerToAddress( const TQString& header )
{
- QStringList addr;
+ TQStringList addr;
int start = 0;
int end = 0;
@@ -250,15 +250,15 @@ MailingList::detect( const KMMessage *message )
}
QString
-MailingList::name( const KMMessage *message, QCString &header_name,
- QString &header_value )
+MailingList::name( const KMMessage *message, TQCString &header_name,
+ TQString &header_value )
{
- QString mlist;
- header_name = QCString();
- header_value = QString::null;
+ TQString mlist;
+ header_name = TQCString();
+ header_value = TQString::null;
if ( !message )
- return QString::null;
+ return TQString::null;
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, QCString &header_name,
return mlist;
}
- return QString::null;
+ return TQString::null;
}
MailingList::MailingList()
@@ -370,7 +370,7 @@ MailingList::archiveURLS() const
}
void
-MailingList::setId( const QString& str )
+MailingList::setId( const TQString& str )
{
mFeatures |= Id;
if ( str.isEmpty() ) {