summaryrefslogtreecommitdiffstats
path: root/libkmime
diff options
context:
space:
mode:
Diffstat (limited to 'libkmime')
-rw-r--r--libkmime/CLASSTREE.headers14
-rw-r--r--libkmime/kmime_charfreq.cpp2
-rw-r--r--libkmime/kmime_charfreq.h4
-rw-r--r--libkmime/kmime_codec_identity.cpp8
-rw-r--r--libkmime/kmime_codec_identity.h10
-rw-r--r--libkmime/kmime_codec_qp.cpp2
-rw-r--r--libkmime/kmime_codecs.cpp52
-rw-r--r--libkmime/kmime_codecs.h48
-rw-r--r--libkmime/kmime_content.cpp80
-rw-r--r--libkmime/kmime_content.h38
-rw-r--r--libkmime/kmime_header_parsing.cpp190
-rw-r--r--libkmime/kmime_header_parsing.h48
-rw-r--r--libkmime/kmime_headers.cpp324
-rw-r--r--libkmime/kmime_headers.h234
-rw-r--r--libkmime/kmime_headers_obs.h186
-rw-r--r--libkmime/kmime_mdn.cpp46
-rw-r--r--libkmime/kmime_mdn.h22
-rw-r--r--libkmime/kmime_message.cpp4
-rw-r--r--libkmime/kmime_message.h2
-rw-r--r--libkmime/kmime_newsarticle.cpp4
-rw-r--r--libkmime/kmime_parsers.cpp34
-rw-r--r--libkmime/kmime_parsers.h46
-rw-r--r--libkmime/kmime_util.cpp128
-rw-r--r--libkmime/kmime_util.h90
-rw-r--r--libkmime/kmime_warning.h4
-rw-r--r--libkmime/kqcstringsplitter.cpp2
-rw-r--r--libkmime/kqcstringsplitter.h10
-rw-r--r--libkmime/tests/test_charfreq.cpp6
-rw-r--r--libkmime/tests/test_dates.cpp18
-rw-r--r--libkmime/tests/test_kmime_codec.cpp78
-rw-r--r--libkmime/tests/test_kmime_header_parsing.cpp64
-rw-r--r--libkmime/tests/test_mdn.cpp24
32 files changed, 911 insertions, 911 deletions
diff --git a/libkmime/CLASSTREE.headers b/libkmime/CLASSTREE.headers
index 210abe473..0dc759261 100644
--- a/libkmime/CLASSTREE.headers
+++ b/libkmime/CLASSTREE.headers
@@ -68,20 +68,20 @@ void setParent( Content* );
//
// 7bit:
-QCString as7BitString()
-bool from7BitString( const QCString & ) // deep copy
+TQCString as7BitString()
+bool from7BitString( const TQCString & ) // deep copy
bool from7BitString( const char * begin, const char * end ) // shallow
bool from7BitString( const char * begin, int length ) // shallow
-bool from7BitString( QByteArray &, int pos, int len ) // shallow
-QStringList validate( const QCString & str );
+bool from7BitString( TQByteArray &, int pos, int len ) // shallow
+TQStringList validate( const TQCString & str );
// for dialogs:
-QString asUnicodeString()
+TQString asUnicodeString()
bool fromUnicodeString()
-QStringList validate( const QString & str );
+TQStringList validate( const TQString & str );
// for reader display:
-QString asHtmlString()
+TQString asHtmlString()
bool fromHtmlString() // ???
diff --git a/libkmime/kmime_charfreq.cpp b/libkmime/kmime_charfreq.cpp
index ea3e42289..fa496b996 100644
--- a/libkmime/kmime_charfreq.cpp
+++ b/libkmime/kmime_charfreq.cpp
@@ -16,7 +16,7 @@
namespace KMime {
-CharFreq::CharFreq( const QByteArray & buf )
+CharFreq::CharFreq( const TQByteArray & buf )
: NUL(0),
CTL(0),
CR(0), LF(0),
diff --git a/libkmime/kmime_charfreq.h b/libkmime/kmime_charfreq.h
index 12d2035cf..e85e063bc 100644
--- a/libkmime/kmime_charfreq.h
+++ b/libkmime/kmime_charfreq.h
@@ -15,7 +15,7 @@
#ifndef __KMIME_CHARFREQ_H__
#define __KMIME_CHARFREQ_H__
-#include <qcstring.h>
+#include <tqcstring.h>
#include <kdepimmacros.h>
#undef None
@@ -23,7 +23,7 @@ namespace KMime {
class KDE_EXPORT CharFreq {
public:
- CharFreq( const QByteArray & buf );
+ CharFreq( const TQByteArray & buf );
CharFreq( const char * buf, size_t len );
enum Type { None = 0, EightBitData, Binary = EightBitData,
diff --git a/libkmime/kmime_codec_identity.cpp b/libkmime/kmime_codec_identity.cpp
index 973ec360c..dd7951f6b 100644
--- a/libkmime/kmime_codec_identity.cpp
+++ b/libkmime/kmime_codec_identity.cpp
@@ -91,19 +91,19 @@ bool IdentityEnDecoder::decode( const char* & scursor, const char * const send,
return scursor == send;
}
-QByteArray IdentityCodec::encode( const QByteArray & src, bool withCRLF ) const {
+TQByteArray IdentityCodec::encode( const TQByteArray & src, bool withCRLF ) const {
kdWarning( withCRLF, 5100 ) << "IdentityCodec::encode(): withCRLF not yet supported!" << endl;
return src;
}
-QByteArray IdentityCodec::decode( const QByteArray & src, bool withCRLF ) const {
+TQByteArray IdentityCodec::decode( const TQByteArray & src, bool withCRLF ) const {
kdWarning( withCRLF, 5100 ) << "IdentityCodec::decode(): withCRLF not yet supported!" << endl;
return src;
}
-QCString IdentityCodec::encodeToQCString( const QByteArray & src, bool withCRLF ) const {
+TQCString IdentityCodec::encodeToQCString( const TQByteArray & src, bool withCRLF ) const {
kdWarning( withCRLF, 5100 ) << "IdentityCodec::encodeToQCString(): withCRLF not yet supported!" << endl;
- return QCString( src.data(), src.size() + 1 );
+ return TQCString( src.data(), src.size() + 1 );
}
} // namespace KMime
diff --git a/libkmime/kmime_codec_identity.h b/libkmime/kmime_codec_identity.h
index 54f5b8fdd..0757351bb 100644
--- a/libkmime/kmime_codec_identity.h
+++ b/libkmime/kmime_codec_identity.h
@@ -44,9 +44,9 @@ protected:
public:
~IdentityCodec() {}
- QByteArray encode( const QByteArray & src, bool withCRLF ) const;
- QCString encodeToQCString( const QByteArray & src, bool withCRLF ) const;
- QByteArray decode( const QByteArray & src, bool withCRLF ) const;
+ TQByteArray encode( const TQByteArray & src, bool withCRLF ) const;
+ TQCString encodeToQCString( const TQByteArray & src, bool withCRLF ) const;
+ TQByteArray decode( const TQByteArray & src, bool withCRLF ) const;
int maxEncodedSizeFor( int insize, bool withCRLF ) const {
if ( withCRLF )
@@ -105,8 +105,8 @@ public:
return insize;
}
- QCString encodeToQCString( const QByteArray &, bool ) const {
- return QCString();
+ TQCString encodeToQCString( const TQByteArray &, bool ) const {
+ return TQCString();
}
};
diff --git a/libkmime/kmime_codec_qp.cpp b/libkmime/kmime_codec_qp.cpp
index c867a6346..6029a31a1 100644
--- a/libkmime/kmime_codec_qp.cpp
+++ b/libkmime/kmime_codec_qp.cpp
@@ -609,7 +609,7 @@ bool Rfc2047QEncodingEncoder::encode( const char* & scursor, const char * const
return (scursor == send);
} // encode
-#include <qstring.h>
+#include <tqstring.h>
bool Rfc2047QEncodingEncoder::finish( char* & dcursor, const char * const dend ) {
mInsideFinishing = true;
diff --git a/libkmime/kmime_codecs.cpp b/libkmime/kmime_codecs.cpp
index fdb385e58..9a55c339d 100644
--- a/libkmime/kmime_codecs.cpp
+++ b/libkmime/kmime_codecs.cpp
@@ -39,7 +39,7 @@
#include <kdebug.h>
-#include <qcstring.h>
+#include <tqcstring.h>
#include <kstaticdeleter.h>
#include <cassert>
@@ -50,11 +50,11 @@ using namespace KMime;
namespace KMime {
// global list of KMime::Codec's
-QAsciiDict<Codec>* Codec::all = 0;
-static KStaticDeleter<QAsciiDict<Codec> > sdAll;
+TQAsciiDict<Codec>* Codec::all = 0;
+static KStaticDeleter<TQAsciiDict<Codec> > sdAll;
#if defined(QT_THREAD_SUPPORT)
-QMutex* Codec::dictLock = 0;
-static KStaticDeleter<QMutex> sdDictLock;
+TQMutex* Codec::dictLock = 0;
+static KStaticDeleter<TQMutex> sdDictLock;
#endif
void Codec::fillDictionary() {
@@ -76,11 +76,11 @@ void Codec::fillDictionary() {
Codec * Codec::codecForName( const char * name ) {
#if defined(QT_THREAD_SUPPORT)
if ( !dictLock )
- sdDictLock.setObject( dictLock, new QMutex );
+ sdDictLock.setObject( dictLock, new TQMutex );
dictLock->lock(); // protect "all"
#endif
if ( !all ) {
- sdAll.setObject( all, new QAsciiDict<Codec>( 11, false /* case-insensitive */) );
+ sdAll.setObject( all, new TQAsciiDict<Codec>( 11, false /* case-insensitive */) );
fillDictionary();
}
Codec * codec = (*all)[ name ];
@@ -94,7 +94,7 @@ Codec * Codec::codecForName( const char * name ) {
return codec;
}
-Codec * Codec::codecForName( const QCString & name ) {
+Codec * Codec::codecForName( const TQCString & name ) {
return codecForName( name.data() );
}
@@ -125,16 +125,16 @@ bool Codec::encode( const char* & scursor, const char * const send,
return true; // successfully encoded.
}
-QByteArray Codec::encode( const QByteArray & src, bool withCRLF ) const
+TQByteArray Codec::encode( const TQByteArray & src, bool withCRLF ) const
{
// allocate buffer for the worst case:
- QByteArray result( maxEncodedSizeFor( src.size(), withCRLF ) );
+ TQByteArray result( maxEncodedSizeFor( src.size(), withCRLF ) );
// set up iterators:
- QByteArray::ConstIterator iit = src.begin();
- QByteArray::ConstIterator iend = src.end();
- QByteArray::Iterator oit = result.begin();
- QByteArray::ConstIterator oend = result.end();
+ TQByteArray::ConstIterator iit = src.begin();
+ TQByteArray::ConstIterator iend = src.end();
+ TQByteArray::Iterator oit = result.begin();
+ TQByteArray::ConstIterator oend = result.end();
// encode
if ( !encode( iit, iend, oit, oend, withCRLF ) )
@@ -147,16 +147,16 @@ QByteArray Codec::encode( const QByteArray & src, bool withCRLF ) const
return result;
}
-QCString Codec::encodeToQCString( const QByteArray & src, bool withCRLF ) const
+TQCString Codec::encodeToQCString( const TQByteArray & src, bool withCRLF ) const
{
// allocate buffer for the worst case (remember to add one for the trailing NUL)
- QCString result( maxEncodedSizeFor( src.size(), withCRLF ) + 1 );
+ TQCString result( maxEncodedSizeFor( src.size(), withCRLF ) + 1 );
// set up iterators:
- QByteArray::ConstIterator iit = src.begin();
- QByteArray::ConstIterator iend = src.end();
- QByteArray::Iterator oit = result.begin();
- QByteArray::ConstIterator oend = result.end() - 1;
+ TQByteArray::ConstIterator iit = src.begin();
+ TQByteArray::ConstIterator iend = src.end();
+ TQByteArray::Iterator oit = result.begin();
+ TQByteArray::ConstIterator oend = result.end() - 1;
// encode
if ( !encode( iit, iend, oit, oend, withCRLF ) )
@@ -169,16 +169,16 @@ QCString Codec::encodeToQCString( const QByteArray & src, bool withCRLF ) const
return result;
}
-QByteArray Codec::decode( const QByteArray & src, bool withCRLF ) const
+TQByteArray Codec::decode( const TQByteArray & src, bool withCRLF ) const
{
// allocate buffer for the worst case:
- QByteArray result( maxDecodedSizeFor( src.size(), withCRLF ) );
+ TQByteArray result( maxDecodedSizeFor( src.size(), withCRLF ) );
// set up iterators:
- QByteArray::ConstIterator iit = src.begin();
- QByteArray::ConstIterator iend = src.end();
- QByteArray::Iterator oit = result.begin();
- QByteArray::ConstIterator oend = result.end();
+ TQByteArray::ConstIterator iit = src.begin();
+ TQByteArray::ConstIterator iend = src.end();
+ TQByteArray::Iterator oit = result.begin();
+ TQByteArray::ConstIterator oend = result.end();
// decode
if ( !decode( iit, iend, oit, oend, withCRLF ) )
diff --git a/libkmime/kmime_codecs.h b/libkmime/kmime_codecs.h
index df2c6a560..3ff0c4a42 100644
--- a/libkmime/kmime_codecs.h
+++ b/libkmime/kmime_codecs.h
@@ -32,12 +32,12 @@
#ifndef __KMIME_CODECS__
#define __KMIME_CODECS__
-#include <qasciidict.h>
+#include <tqasciidict.h>
#if defined(QT_THREAD_SUPPORT)
-# include <qmutex.h>
+# include <tqmutex.h>
#endif
-#include <qcstring.h> // QByteArray
+#include <tqcstring.h> // QByteArray
#include <kdebug.h> // for kdFatal()
#include <kdepimmacros.h>
@@ -57,9 +57,9 @@ class Decoder;
class KDE_EXPORT Codec {
protected:
- static QAsciiDict<Codec>* all;
+ static TQAsciiDict<Codec>* all;
#if defined(QT_THREAD_SUPPORT)
- static QMutex* dictLock;
+ static TQMutex* dictLock;
#endif
Codec() {}
@@ -68,7 +68,7 @@ private:
public:
static Codec * codecForName( const char * name );
- static Codec * codecForName( const QCString & name );
+ static Codec * codecForName( const TQCString & name );
virtual int maxEncodedSizeFor( int insize, bool withCRLF=false ) const = 0;
virtual int maxDecodedSizeFor( int insize, bool withCRLF=false ) const = 0;
@@ -91,9 +91,9 @@ public:
* <pre>
* KMime::Codec * codec = KMime::Codec::codecForName( "base64" );
* kdFatal( !codec ) << "no base64 codec found!?" << endl;
- * QByteArray out( in.size()*1.4 ); // crude maximal size of b64 encoding
- * QByteArray::Iterator iit = in.begin();
- * QByteArray::Iterator oit = out.begin();
+ * TQByteArray out( in.size()*1.4 ); // crude maximal size of b64 encoding
+ * TQByteArray::Iterator iit = in.begin();
+ * TQByteArray::Iterator oit = out.begin();
* if ( !codec->encode( iit, in.end(), oit, out.end() ) ) {
* kdDebug() << "output buffer too small" << endl;
* return;
@@ -127,9 +127,9 @@ public:
* <pre>
* KMime::Codec * codec = KMime::Codec::codecForName( "base64" );
* kdFatal( !codec ) << "no base64 codec found!?" << endl;
- * QByteArray out( in.size() ); // good guess for any encoding...
- * QByteArray::Iterator iit = in.begin();
- * QByteArray::Iterator oit = out.begin();
+ * TQByteArray out( in.size() ); // good guess for any encoding...
+ * TQByteArray::Iterator iit = in.begin();
+ * TQByteArray::Iterator oit = out.begin();
* if ( !codec->decode( iit, in.end(), oit, out.end() ) ) {
* kdDebug() << "output buffer too small" << endl;
* return;
@@ -151,33 +151,33 @@ public:
/**
* Even more convenient, but also a bit slower and more memory
* intensive, since it allocates storage for the worst case and then
- * shrinks the result QByteArray to the actual size again.
+ * shrinks the result TQByteArray to the actual size again.
*
* For use with small @p src.
**/
- virtual QByteArray encode( const QByteArray & src, bool withCRLF=false ) const;
+ virtual TQByteArray encode( const TQByteArray & src, bool withCRLF=false ) const;
/**
* Even more convenient, but also a bit slower and more memory
* intensive, since it allocates storage for the worst case and then
- * shrinks the result QCString to the actual size again.
+ * shrinks the result TQCString to the actual size again.
*
* For use with small @p src.
*
* This method only works for codecs whose output is in the 8bit
* domain (ie. not in the binary domain). Codecs that do not fall
- * into this category will return a null QCString.
+ * into this category will return a null TQCString.
**/
- virtual QCString encodeToQCString( const QByteArray & src, bool withCRLF=false ) const;
+ virtual TQCString encodeToQCString( const TQByteArray & src, bool withCRLF=false ) const;
/**
* Even more convenient, but also a bit slower and more memory
* intensive, since it allocates storage for the worst case and then
- * shrinks the result QByteArray to the actual size again.
+ * shrinks the result TQByteArray to the actual size again.
*
* For use with small @p src.
**/
- virtual QByteArray decode( const QByteArray & src, bool withCRLF=false ) const;
+ virtual TQByteArray decode( const TQByteArray & src, bool withCRLF=false ) const;
/**
* @return the name of the encoding. Guaranteed to be lowercase.
@@ -189,7 +189,7 @@ public:
};
/**
- * Stateful decoder class, modelled after QTextDecoder.
+ * Stateful decoder class, modelled after TQTextDecoder.
*
* @section Overview
*
@@ -238,9 +238,9 @@ public:
* kdFatal( !codec ) << "No codec found for base64!" << endl;
* KMime::Decoder * dec = codec->makeDecoder();
* assert( dec ); // should not happen
- * QByteArray out( 256 ); // small buffer is enough ;-)
- * QByteArray::Iterator iit = in.begin();
- * QByteArray::Iterator oit = out.begin();
+ * TQByteArray out( 256 ); // small buffer is enough ;-)
+ * TQByteArray::Iterator iit = in.begin();
+ * TQByteArray::Iterator oit = out.begin();
* // decode the chunk
* while ( !dec->decode( iit, in.end(), oit, out.end() ) )
* if ( oit == out.end() ) { // output buffer full, process contents
@@ -293,7 +293,7 @@ protected:
const bool mWithCRLF;
};
-/** Stateful encoder class, modelled after QTextEncoder.
+/** Stateful encoder class, modelled after TQTextEncoder.
@short Stateful encoder class
@author Marc Mutz <mutz@kde.org>
*/
diff --git a/libkmime/kmime_content.cpp b/libkmime/kmime_content.cpp
index e450d8022..6eca383fa 100644
--- a/libkmime/kmime_content.cpp
+++ b/libkmime/kmime_content.cpp
@@ -22,7 +22,7 @@
#include <klocale.h>
#include <kdebug.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
using namespace KMime;
@@ -35,7 +35,7 @@ Content::Content()
}
-Content::Content(const QCString &h, const QCString &b)
+Content::Content(const TQCString &h, const TQCString &b)
: c_ontents(0), h_eaders(0), f_orceDefaultCS(false)
{
d_efaultCS = cachedCharset("ISO-8859-1");
@@ -51,17 +51,17 @@ Content::~Content()
}
-void Content::setContent(QStrList *l)
+void Content::setContent(TQStrList *l)
{
- //qDebug("Content::setContent(QStrList *l) : start");
+ //qDebug("Content::setContent(TQStrList *l) : start");
h_ead.resize(0);
b_ody.resize(0);
//usage of textstreams is much faster than simply appending the strings
- QTextStream hts(h_ead, IO_WriteOnly),
+ TQTextStream hts(h_ead, IO_WriteOnly),
bts(b_ody, IO_WriteOnly);
- hts.setEncoding(QTextStream::Latin1);
- bts.setEncoding(QTextStream::Latin1);
+ hts.setEncoding(TQTextStream::Latin1);
+ bts.setEncoding(TQTextStream::Latin1);
bool isHead=true;
for(char *line=l->first(); line; line=l->next()) {
@@ -79,11 +79,11 @@ void Content::setContent(QStrList *l)
hts << '\0';
bts << '\0';
- //qDebug("Content::setContent(QStrList *l) : finished");
+ //qDebug("Content::setContent(TQStrList *l) : finished");
}
-void Content::setContent(const QCString &s)
+void Content::setContent(const TQCString &s)
{
int pos=s.find("\n\n", 0);
if(pos>-1) {
@@ -116,7 +116,7 @@ void Content::parse()
c_ontents=0;
Headers::ContentType *ct=contentType();
- QCString tmp;
+ TQCString tmp;
Content *c;
Headers::contentCategory cat;
@@ -229,8 +229,8 @@ void Content::parse()
c->setContent(tmp);
// the bodies of yenc message parts are binary data, not null-terminated strings:
- QByteArray body = yenc.binaryParts()[i];
- QCString body_string(body.size());
+ TQByteArray body = yenc.binaryParts()[i];
+ TQCString body_string(body.size());
memcpy(body_string.data(), body.data(), body.size());
c->setBody(body_string);
@@ -255,7 +255,7 @@ void Content::parse()
void Content::assemble()
{
- QCString newHead="";
+ TQCString newHead="";
//Content-Type
newHead+=contentType()->as7BitString()+"\n";
@@ -288,9 +288,9 @@ void Content::clear()
}
-QCString Content::encodedContent(bool useCrLf)
+TQCString Content::encodedContent(bool useCrLf)
{
- QCString e;
+ TQCString e;
// hack to convert articles with uuencoded or yencoded binaries into
// proper mime-compliant articles
@@ -313,9 +313,9 @@ QCString Content::encodedContent(bool useCrLf)
// add proper mime headers...
if (convertNonMimeBinaries) {
- h_ead.replace(QRegExp("MIME-Version: .*\\n"),"");
- h_ead.replace(QRegExp("Content-Type: .*\\n"),"");
- h_ead.replace(QRegExp("Content-Transfer-Encoding: .*\\n"),"");
+ h_ead.replace(TQRegExp("MIME-Version: .*\\n"),"");
+ h_ead.replace(TQRegExp("Content-Type: .*\\n"),"");
+ h_ead.replace(TQRegExp("Content-Transfer-Encoding: .*\\n"),"");
h_ead+="MIME-Version: 1.0\n";
h_ead+=contentType(true)->as7BitString()+"\n";
h_ead+=contentTransferEncoding(true)->as7BitString()+"\n";
@@ -332,7 +332,7 @@ QCString Content::encodedContent(bool useCrLf)
if(enc->needToEncode()) {
if(enc->cte()==Headers::CEquPr) {
- QByteArray temp(b_ody.length());
+ TQByteArray temp(b_ody.length());
memcpy(temp.data(), b_ody.data(), b_ody.length());
e+=KCodecs::quotedPrintableEncode(temp, false);
} else {
@@ -345,7 +345,7 @@ QCString Content::encodedContent(bool useCrLf)
}
else if(c_ontents && !c_ontents->isEmpty()) { //this is a multipart message
Headers::ContentType *ct=contentType();
- QCString boundary="\n--"+ct->boundary();
+ TQCString boundary="\n--"+ct->boundary();
//add all (encoded) contents separated by boundaries
for(Content *c=c_ontents->first(); c; c=c_ontents->next()) {
@@ -363,9 +363,9 @@ QCString Content::encodedContent(bool useCrLf)
}
-QByteArray Content::decodedContent()
+TQByteArray Content::decodedContent()
{
- QByteArray temp, ret;
+ TQByteArray temp, ret;
Headers::CTEncoding *ec=contentTransferEncoding();
bool removeTrailingNewline=false;
int size=ec->cte()==Headers::CEbinary ? b_ody.size() : b_ody.length();
@@ -409,14 +409,14 @@ QByteArray Content::decodedContent()
}
-void Content::decodedText(QString &s, bool trimText,
+void Content::decodedText(TQString &s, bool trimText,
bool removeTrailingNewlines)
{
if(!decodeText()) //this is not a text content !!
return;
bool ok=true;
- QTextCodec *codec=KGlobal::charsets()->codecForName(contentType()->charset(),ok);
+ TQTextCodec *codec=KGlobal::charsets()->codecForName(contentType()->charset(),ok);
s=codec->toUnicode(b_ody.data(), b_ody.length());
@@ -433,16 +433,16 @@ void Content::decodedText(QString &s, bool trimText,
}
-void Content::decodedText(QStringList &l, bool trimText,
+void Content::decodedText(TQStringList &l, bool trimText,
bool removeTrailingNewlines)
{
if(!decodeText()) //this is not a text content !!
return;
- QString unicode;
+ TQString unicode;
bool ok=true;
- QTextCodec *codec=KGlobal::charsets()->codecForName(contentType()->charset(),ok);
+ TQTextCodec *codec=KGlobal::charsets()->codecForName(contentType()->charset(),ok);
unicode=codec->toUnicode(b_ody.data(), b_ody.length());
@@ -457,18 +457,18 @@ void Content::decodedText(QStringList &l, bool trimText,
unicode.truncate(unicode.length()-1); // remove trailing new-line
}
- l=QStringList::split('\n', unicode, true); //split the string at linebreaks
+ l=TQStringList::split('\n', unicode, true); //split the string at linebreaks
}
-void Content::fromUnicodeString(const QString &s)
+void Content::fromUnicodeString(const TQString &s)
{
bool ok=true;
- QTextCodec *codec=KGlobal::charsets()->codecForName(contentType()->charset(),ok);
+ TQTextCodec *codec=KGlobal::charsets()->codecForName(contentType()->charset(),ok);
if(!ok) { // no suitable codec found => try local settings and hope the best ;-)
codec=KGlobal::locale()->codecForEncoding();
- QCString chset=KGlobal::locale()->encoding();
+ TQCString chset=KGlobal::locale()->encoding();
contentType()->setCharset(chset);
}
@@ -647,18 +647,18 @@ void Content::changeEncoding(Headers::contentEncoding e)
}
-void Content::toStream(QTextStream &ts, bool scrambleFromLines)
+void Content::toStream(TQTextStream &ts, bool scrambleFromLines)
{
- QCString ret=encodedContent(false);
+ TQCString ret=encodedContent(false);
if (scrambleFromLines)
- ret.replace(QRegExp("\\n\\nFrom "), "\n\n>From ");
+ ret.replace(TQRegExp("\\n\\nFrom "), "\n\n>From ");
ts << ret;
}
-Headers::Generic* Content::getNextHeader(QCString &head)
+Headers::Generic* Content::getNextHeader(TQCString &head)
{
int pos1=-1, pos2=0, len=head.length()-1;
bool folded(false);
@@ -684,7 +684,7 @@ Headers::Generic* Content::getNextHeader(QCString &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(QRegExp("\\s*\\n\\s*")," "));
+ header = new Headers::Generic(head.left(pos1-2), this, head.mid(pos1, pos2-pos1).replace(TQRegExp("\\s*\\n\\s*")," "));
head.remove(0,pos2+1);
}
@@ -708,7 +708,7 @@ Headers::Base* Content::getHeaderByType(const char *type)
if(h->is(type)) return h; //found
//now we look for it in the article head
- QCString raw=rawHeader(type);
+ TQCString raw=rawHeader(type);
if(!raw.isEmpty()) { //ok, we found it
//choose a suitable header class
if(strcasecmp("Message-Id", type)==0)
@@ -827,7 +827,7 @@ int Content::lineCount()
}
-QCString Content::rawHeader(const char *name)
+TQCString Content::rawHeader(const char *name)
{
return extractHeader(h_ead, name);
}
@@ -855,7 +855,7 @@ bool Content::decodeText()
b_ody.append("\n");
break;
case Headers::CEbinary :
- b_ody=QCString(b_ody.data(), b_ody.size()+1);
+ b_ody=TQCString(b_ody.data(), b_ody.size()+1);
b_ody.append("\n");
default :
break;
@@ -866,7 +866,7 @@ bool Content::decodeText()
}
-void Content::setDefaultCharset(const QCString &cs)
+void Content::setDefaultCharset(const TQCString &cs)
{
d_efaultCS = KMime::cachedCharset(cs);
diff --git a/libkmime/kmime_content.h b/libkmime/kmime_content.h
index fb28b5e61..1d2aac2d3 100644
--- a/libkmime/kmime_content.h
+++ b/libkmime/kmime_content.h
@@ -29,7 +29,7 @@ class KMime::Headers::List;
#include "kmime_util.h"
#include "kmime_headers.h"
-#include <qtextstream.h>
+#include <tqtextstream.h>
namespace KMime {
@@ -59,10 +59,10 @@ class Base {
class KDE_EXPORT Content : public Base {
public:
- typedef QPtrList<KMime::Content> List;
+ typedef TQPtrList<KMime::Content> List;
Content();
- Content(const QCString &h, const QCString &b);
+ Content(const TQCString &h, const TQCString &b);
virtual ~Content();
//type
@@ -70,16 +70,16 @@ class KDE_EXPORT Content : public Base {
//content handling
bool hasContent() { return ( !h_ead.isEmpty() && (!b_ody.isEmpty() || (c_ontents && !c_ontents->isEmpty())) ); }
- void setContent(QStrList *l);
- void setContent(const QCString &s);
+ void setContent(TQStrList *l);
+ void setContent(const TQCString &s);
virtual void parse();
virtual void assemble();
virtual void clear();
//header access
- QCString head() { return h_ead; }
+ TQCString head() { return h_ead; }
// extracts and removes the next header from head. The caller has to delete the returned header;
- Headers::Generic* getNextHeader(QCString &head);
+ Headers::Generic* getNextHeader(TQCString &head);
virtual Headers::Base* getHeaderByType(const char *type);
virtual void setHeader(Headers::Base *h);
virtual bool removeHeader(const char *type);
@@ -93,15 +93,15 @@ class KDE_EXPORT Content : public Base {
int size();
int storageSize();
int lineCount();
- QCString body() { return b_ody; }
- void setBody( const QCString & str ) { b_ody = str; }
- QCString encodedContent(bool useCrLf=false);
- QByteArray decodedContent();
- void decodedText(QString &s, bool trimText=false,
+ TQCString body() { return b_ody; }
+ void setBody( const TQCString & str ) { b_ody = str; }
+ TQCString encodedContent(bool useCrLf=false);
+ TQByteArray decodedContent();
+ void decodedText(TQString &s, bool trimText=false,
bool removeTrailingNewlines=false);
- void decodedText(QStringList &s, bool trimText=false,
+ void decodedText(TQStringList &s, bool trimText=false,
bool removeTrailingNewlines=false);
- void fromUnicodeString(const QString &s);
+ void fromUnicodeString(const TQString &s);
Content* textContent();
void attachments(List *dst, bool incAlternatives=false);
@@ -112,12 +112,12 @@ class KDE_EXPORT Content : public Base {
//saves the encoded content to the given textstream
// scrambleFromLines: replace "\nFrom " with "\n>From ", this is
// needed to avoid problem with mbox-files
- void toStream(QTextStream &ts, bool scrambleFromLines=false);
+ void toStream(TQTextStream &ts, bool scrambleFromLines=false);
// this charset is used for all headers and the body
// if the charset is not declared explictly
- QCString defaultCharset() { return QCString(d_efaultCS); }
- void setDefaultCharset(const QCString &cs);
+ TQCString defaultCharset() { return TQCString(d_efaultCS); }
+ void setDefaultCharset(const TQCString &cs);
// use the default charset even if a different charset is
// declared in the article
@@ -130,11 +130,11 @@ class KDE_EXPORT Content : public Base {
protected:
- QCString rawHeader(const char *name);
+ TQCString rawHeader(const char *name);
bool decodeText();
template <class T> T* getHeaderInstance(T *ptr, bool create);
- QCString h_ead,
+ TQCString h_ead,
b_ody;
List *c_ontents;
Headers::Base::List *h_eaders;
diff --git a/libkmime/kmime_header_parsing.cpp b/libkmime/kmime_header_parsing.cpp
index 1b67cee2b..9222ff914 100644
--- a/libkmime/kmime_header_parsing.cpp
+++ b/libkmime/kmime_header_parsing.cpp
@@ -39,10 +39,10 @@
#include <kglobal.h>
#include <kcharsets.h>
-#include <qtextcodec.h>
-#include <qmap.h>
-#include <qcstring.h>
-#include <qstringlist.h>
+#include <tqtextcodec.h>
+#include <tqmap.h>
+#include <tqcstring.h>
+#include <tqstringlist.h>
#include <ctype.h> // for isdigit
#include <cassert>
@@ -54,9 +54,9 @@ namespace KMime {
namespace Types {
- QString AddrSpec::asString() const {
+ TQString AddrSpec::asString() const {
bool needsQuotes = false;
- QString result;
+ TQString result;
result.reserve( localPart.length() + domain.length() + 1 );
for ( unsigned int i = 0 ; i < localPart.length() ; ++i ) {
const char ch = localPart[i].latin1();
@@ -81,7 +81,7 @@ namespace HeaderParsing {
// parse the encoded-word (scursor points to after the initial '=')
bool parseEncodedWord( const char* & scursor, const char * const send,
- QString & result, QCString & language ) {
+ TQString & result, TQCString & language ) {
// make sure the caller already did a bit of the work.
assert( *(scursor-1) == '=' );
@@ -121,10 +121,10 @@ bool parseEncodedWord( const char* & scursor, const char * const send,
// extract the language information, if any (if languageStart is 0,
// language will be null, too):
- QCString maybeLanguage( languageStart, scursor - languageStart + 1 /*for NUL*/);
+ TQCString maybeLanguage( languageStart, scursor - languageStart + 1 /*for NUL*/);
// extract charset information (keep in mind: the size given to the
// ctor is one off due to the \0 terminator):
- QCString maybeCharset( charsetStart, ( languageStart ? languageStart : scursor + 1 ) - charsetStart );
+ TQCString maybeCharset( charsetStart, ( languageStart ? languageStart : scursor + 1 ) - charsetStart );
//
// STEP 2:
@@ -148,7 +148,7 @@ bool parseEncodedWord( const char* & scursor, const char * const send,
}
// extract the encoding information:
- QCString maybeEncoding( encodingStart, scursor - encodingStart + 1 );
+ TQCString maybeEncoding( encodingStart, scursor - encodingStart + 1 );
kdDebug() << "parseEncodedWord: found charset == \"" << maybeCharset
@@ -220,9 +220,9 @@ bool parseEncodedWord( const char* & scursor, const char * const send,
// allocate a temporary buffer to store the 8bit text:
int encodedTextLength = encodedTextEnd - encodedTextStart;
- QByteArray buffer( codec->maxDecodedSizeFor( encodedTextLength ) );
- QByteArray::Iterator bit = buffer.begin();
- QByteArray::ConstIterator bend = buffer.end();
+ TQByteArray buffer( codec->maxDecodedSizeFor( encodedTextLength ) );
+ TQByteArray::Iterator bit = buffer.begin();
+ TQByteArray::ConstIterator bend = buffer.end();
//
// STEP 5:
@@ -251,12 +251,12 @@ static inline void eatWhiteSpace( const char* & scursor, const char * const send
}
bool parseAtom( const char * & scursor, const char * const send,
- QString & result, bool allow8Bit )
+ TQString & result, bool allow8Bit )
{
QPair<const char*,int> maybeResult;
if ( parseAtom( scursor, send, maybeResult, allow8Bit ) ) {
- result += QString::fromLatin1( maybeResult.first, maybeResult.second );
+ result += TQString::fromLatin1( maybeResult.first, maybeResult.second );
return true;
}
@@ -291,12 +291,12 @@ bool parseAtom( const char * & scursor, const char * const send,
}
bool parseToken( const char * & scursor, const char * const send,
- QString & result, bool allow8Bit )
+ TQString & result, bool allow8Bit )
{
QPair<const char*,int> maybeResult;
if ( parseToken( scursor, send, maybeResult, allow8Bit ) ) {
- result += QString::fromLatin1( maybeResult.first, maybeResult.second );
+ result += TQString::fromLatin1( maybeResult.first, maybeResult.second );
return true;
}
@@ -343,7 +343,7 @@ bool parseToken( const char * & scursor, const char * const send,
// - doesn't handle quoted CRLF
bool parseGenericQuotedString( const char* & scursor, const char * const send,
- QString & result, bool isCRLF,
+ TQString & result, bool isCRLF,
const char openChar, const char closeChar )
{
char ch;
@@ -369,7 +369,7 @@ bool parseGenericQuotedString( const char* & scursor, const char * const send,
// misses "\" CRLF LWSP-char handling, see rfc822, 3.4.5
READ_ch_OR_FAIL;
KMIME_WARN_IF_8BIT(ch);
- result += QChar(ch);
+ result += TQChar(ch);
break;
case '\r':
// ###
@@ -383,7 +383,7 @@ bool parseGenericQuotedString( const char* & scursor, const char * const send,
if ( ch != '\n' ) {
// CR on it's own...
KMIME_WARN_LONE(CR);
- result += QChar('\r');
+ result += TQChar('\r');
scursor--; // points to after the '\r' again
} else {
// CRLF encountered.
@@ -393,7 +393,7 @@ bool parseGenericQuotedString( const char* & scursor, const char * const send,
// correct folding;
// position cursor behind the CRLF WSP (unfolding)
// and add the WSP to the result
- result += QChar(ch);
+ result += TQChar(ch);
} else {
// this is the "shouldn't happen"-case. There is a CRLF
// inside a quoted-string without it being part of FWS.
@@ -419,11 +419,11 @@ bool parseGenericQuotedString( const char* & scursor, const char * const send,
if ( !isCRLF && ( ch == ' ' || ch == '\t' ) ) {
// folding
// correct folding
- result += QChar(ch);
+ result += TQChar(ch);
} else {
// non-folding
KMIME_WARN_LONE(LF);
- result += QChar('\n');
+ result += TQChar('\n');
// pos is decremented, so's we need not duplicate the whole
// switch here. ch could've been everything (incl. <">, "\").
scursor--;
@@ -431,7 +431,7 @@ bool parseGenericQuotedString( const char* & scursor, const char * const send,
break;
default:
KMIME_WARN_IF_8BIT(ch);
- result += QChar(ch);
+ result += TQChar(ch);
}
}
@@ -443,17 +443,17 @@ bool parseGenericQuotedString( const char* & scursor, const char * const send,
// - doesn't handle encoded-word inside comments.
bool parseComment( const char* & scursor, const char * const send,
- QString & result, bool isCRLF, bool reallySave )
+ TQString & result, bool isCRLF, bool reallySave )
{
int commentNestingDepth = 1;
const char * afterLastClosingParenPos = 0;
- QString maybeCmnt;
+ TQString maybeCmnt;
const char * oldscursor = scursor;
assert( *(scursor-1) == '(' );
while ( commentNestingDepth ) {
- QString cmntPart;
+ TQString cmntPart;
if ( parseGenericQuotedString( scursor, send, cmntPart, isCRLF, '(', ')' ) ) {
assert( *(scursor-1) == ')' || *(scursor-1) == '(' );
// see the kdoc for above function for the possible conditions
@@ -465,8 +465,8 @@ bool parseComment( const char* & scursor, const char * const send,
result += maybeCmnt;
result += cmntPart;
if ( commentNestingDepth > 1 ) // don't add the outermost ')'...
- result += QChar(')');
- maybeCmnt = QString::null;
+ result += TQChar(')');
+ maybeCmnt = TQString::null;
}
afterLastClosingParenPos = scursor;
--commentNestingDepth;
@@ -476,7 +476,7 @@ bool parseComment( const char* & scursor, const char * const send,
// don't add to "result" yet, because we might find that we
// are already outside the (broken) comment...
maybeCmnt += cmntPart;
- maybeCmnt += QChar('(');
+ maybeCmnt += TQChar('(');
}
++commentNestingDepth;
break;
@@ -499,11 +499,11 @@ bool parseComment( const char* & scursor, const char * const send,
// known issues: none.
bool parsePhrase( const char* & scursor, const char * const send,
- QString & result, bool isCRLF )
+ TQString & result, bool isCRLF )
{
enum { None, Phrase, Atom, EncodedWord, QuotedString } found = None;
- QString tmp;
- QCString lang;
+ TQString tmp;
+ TQCString lang;
const char * successfullyParsed = 0;
// only used by the encoded-word branch
const char * oldscursor;
@@ -527,7 +527,7 @@ bool parsePhrase( const char* & scursor, const char * const send,
}
break;
case '"': // quoted-string
- tmp = QString::null;
+ tmp = TQString::null;
if ( parseGenericQuotedString( scursor, send, tmp, isCRLF, '"', '"' ) ) {
successfullyParsed = scursor;
assert( *(scursor-1) == '"' );
@@ -540,7 +540,7 @@ bool parsePhrase( const char* & scursor, const char * const send,
case EncodedWord:
case QuotedString:
found = Phrase;
- result += QChar(' '); // rfc822, 3.4.4
+ result += TQChar(' '); // rfc822, 3.4.4
break;
default:
assert( 0 );
@@ -554,7 +554,7 @@ bool parsePhrase( const char* & scursor, const char * const send,
if ( found == None ) {
return false;
} else {
- result += QChar(' '); // rfc822, 3.4.4
+ result += TQChar(' '); // rfc822, 3.4.4
result += tmp;
return true;
}
@@ -562,7 +562,7 @@ bool parsePhrase( const char* & scursor, const char * const send,
break;
case '(': // comment
// parse it, but ignore content:
- tmp = QString::null;
+ tmp = TQString::null;
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 = QString::null;
+ tmp = TQString::null;
oldscursor = scursor;
lang = 0;
if ( parseEncodedWord( scursor, send, tmp, lang ) ) {
@@ -591,7 +591,7 @@ bool parsePhrase( const char* & scursor, const char * const send,
case Atom:
case QuotedString:
if ( !lastWasEncodedWord )
- result += QChar(' '); // rfc822, 3.4.4
+ result += TQChar(' '); // rfc822, 3.4.4
found = Phrase;
break;
default: assert( 0 );
@@ -605,7 +605,7 @@ bool parsePhrase( const char* & scursor, const char * const send,
// fall though...
default: //atom
- tmp = QString::null;
+ tmp = TQString::null;
scursor--;
if ( parseAtom( scursor, send, tmp, true /* allow 8bit */ ) ) {
successfullyParsed = scursor;
@@ -618,7 +618,7 @@ bool parsePhrase( const char* & scursor, const char * const send,
case EncodedWord:
case QuotedString:
found = Phrase;
- result += QChar(' '); // rfc822, 3.4.4
+ result += TQChar(' '); // rfc822, 3.4.4
break;
default:
assert( 0 );
@@ -642,12 +642,12 @@ bool parsePhrase( const char* & scursor, const char * const send,
bool parseDotAtom( const char* & scursor, const char * const send,
- QString & result, bool isCRLF )
+ TQString & result, bool isCRLF )
{
// always points to just after the last atom parsed:
const char * successfullyParsed;
- QString tmp;
+ TQString tmp;
if ( !parseAtom( scursor, send, tmp, false /* no 8bit */ ) )
return false;
result += tmp;
@@ -671,13 +671,13 @@ bool parseDotAtom( const char* & scursor, const char * const send,
}
// try to parse the next atom:
- QString maybeAtom;
+ TQString maybeAtom;
if ( !parseAtom( scursor, send, maybeAtom, false /*no 8bit*/ ) ) {
scursor = successfullyParsed;
return true;
}
- result += QChar('.');
+ result += TQChar('.');
result += maybeAtom;
successfullyParsed = scursor;
}
@@ -688,7 +688,7 @@ bool parseDotAtom( const char* & scursor, const char * const send,
void eatCFWS( const char* & scursor, const char * const send, bool isCRLF ) {
- QString dummy;
+ TQString dummy;
while ( scursor != send ) {
const char * oldscursor = scursor;
@@ -717,7 +717,7 @@ void eatCFWS( const char* & scursor, const char * const send, bool isCRLF ) {
}
bool parseDomain( const char* & scursor, const char * const send,
- QString & result, bool isCRLF ) {
+ TQString & result, bool isCRLF ) {
eatCFWS( scursor, send, isCRLF );
if ( scursor == send ) return false;
@@ -729,7 +729,7 @@ bool parseDomain( const char* & scursor, const char * const send,
if ( *scursor == '[' ) {
// domain-literal:
- QString maybeDomainLiteral;
+ TQString maybeDomainLiteral;
// eat '[':
scursor++;
while ( parseGenericQuotedString( scursor, send, maybeDomainLiteral,
@@ -748,7 +748,7 @@ bool parseDomain( const char* & scursor, const char * const send,
// we hit openChar in parseGenericQuotedString.
// include it in maybeDomainLiteral and keep on parsing:
if ( *(scursor-1) == '[' ) {
- maybeDomainLiteral += QChar('[');
+ maybeDomainLiteral += TQChar('[');
continue;
}
// OK, real end of domain-literal:
@@ -757,7 +757,7 @@ bool parseDomain( const char* & scursor, const char * const send,
}
} else {
// dot-atom:
- QString maybeDotAtom;
+ TQString maybeDotAtom;
if ( parseDotAtom( scursor, send, maybeDotAtom, isCRLF ) ) {
result = maybeDotAtom;
return true;
@@ -767,7 +767,7 @@ bool parseDomain( const char* & scursor, const char * const send,
}
bool parseObsRoute( const char* & scursor, const char* const send,
- QStringList & result, bool isCRLF, bool save ) {
+ TQStringList & result, bool isCRLF, bool save ) {
while ( scursor != send ) {
eatCFWS( scursor, send, isCRLF );
if ( scursor == send ) return false;
@@ -775,14 +775,14 @@ bool parseObsRoute( const char* & scursor, const char* const send,
// empty entry:
if ( *scursor == ',' ) {
scursor++;
- if ( save ) result.append( QString::null );
+ if ( save ) result.append( TQString::null );
continue;
}
// empty entry ending the list:
if ( *scursor == ':' ) {
scursor++;
- if ( save ) result.append( QString::null );
+ if ( save ) result.append( TQString::null );
return true;
}
@@ -792,7 +792,7 @@ bool parseObsRoute( const char* & scursor, const char* const send,
else
scursor++;
- QString maybeDomain;
+ TQString maybeDomain;
if ( !parseDomain( scursor, send, maybeDomain, isCRLF ) ) return false;
if ( save ) result.append( maybeDomain );
@@ -816,8 +816,8 @@ bool parseAddrSpec( const char* & scursor, const char * const send,
// this is equivalent to:
// local-part := word *("." word)
- QString maybeLocalPart;
- QString tmp;
+ TQString maybeLocalPart;
+ TQString tmp;
while ( scursor != send ) {
// first, eat any whitespace
@@ -826,7 +826,7 @@ bool parseAddrSpec( const char* & scursor, const char * const send,
char ch = *scursor++;
switch ( ch ) {
case '.': // dot
- maybeLocalPart += QChar('.');
+ maybeLocalPart += TQChar('.');
break;
case '@':
@@ -834,7 +834,7 @@ bool parseAddrSpec( const char* & scursor, const char * const send,
break;
case '"': // quoted-string
- tmp = QString::null;
+ tmp = TQString::null;
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 = QString::null;
+ tmp = TQString::null;
if ( parseAtom( scursor, send, tmp, false /* no 8bit */ ) )
maybeLocalPart += tmp;
else
@@ -864,7 +864,7 @@ SAW_AT_SIGN:
assert( *(scursor-1) == '@' );
- QString maybeDomain;
+ TQString maybeDomain;
if ( !parseDomain( scursor, send, maybeDomain, isCRLF ) )
return false;
@@ -888,7 +888,7 @@ bool parseAngleAddr( const char* & scursor, const char * const send,
if ( *scursor == '@' || *scursor == ',' ) {
// obs-route: parse, but ignore:
KMIME_WARN << "obsolete source route found! ignoring." << endl;
- QStringList dummy;
+ TQStringList dummy;
if ( !parseObsRoute( scursor, send, dummy,
isCRLF, false /* don't save */ ) )
return false;
@@ -926,17 +926,17 @@ 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 = QString::null;
+ result.displayName = TQString::null;
result.addrSpec = maybeAddrSpec;
return true;
}
scursor = oldscursor;
// second, see if there's a display-name:
- QString maybeDisplayName;
+ TQString maybeDisplayName;
if ( !parsePhrase( scursor, send, maybeDisplayName, isCRLF ) ) {
// failed: reset cursor, note absent display-name
- maybeDisplayName = QString::null;
+ maybeDisplayName = TQString::null;
scursor = oldscursor;
} else {
// succeeded: eat CFWS
@@ -974,7 +974,7 @@ bool parseGroup( const char* & scursor, const char * const send,
if ( scursor == send ) return false;
// get display-name:
- QString maybeDisplayName;
+ TQString maybeDisplayName;
if ( !parsePhrase( scursor, send, maybeDisplayName, isCRLF ) )
return false;
@@ -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 = QString::null;
+ result.displayName = TQString::null;
result.mailboxList.append( maybeMailbox );
return true;
}
@@ -1065,19 +1065,19 @@ bool parseAddressList( const char* & scursor, const char * const send,
}
-static QString asterisk = QString::fromLatin1("*0*",1);
-static QString asteriskZero = QString::fromLatin1("*0*",2);
-//static QString asteriskZeroAsterisk = QString::fromLatin1("*0*",3);
+static TQString asterisk = TQString::fromLatin1("*0*",1);
+static TQString asteriskZero = TQString::fromLatin1("*0*",2);
+//static TQString asteriskZeroAsterisk = TQString::fromLatin1("*0*",3);
bool parseParameter( const char* & scursor, const char * const send,
- QPair<QString,QStringOrQPair> & result, bool isCRLF ) {
+ QPair<TQString,QStringOrQPair> & result, bool isCRLF ) {
// parameter = regular-parameter / extended-parameter
// regular-parameter = regular-parameter-name "=" value
// extended-parameter =
// value = token / quoted-string
//
// note that rfc2231 handling is out of the scope of this function.
- // Therefore we return the attribute as QString and the value as
+ // Therefore we return the attribute as TQString and the value as
// (start,length) tupel if we see that the value is encoded
// (trailing asterisk), for parseParameterList to decode...
@@ -1087,7 +1087,7 @@ bool parseParameter( const char* & scursor, const char * const send,
//
// parse the parameter name:
//
- QString maybeAttribute;
+ TQString maybeAttribute;
if ( !parseToken( scursor, send, maybeAttribute, false /* no 8bit */ ) )
return false;
@@ -1147,7 +1147,7 @@ bool parseParameter( const char* & scursor, const char * const send,
bool parseRawParameterList( const char* & scursor, const char * const send,
- QMap<QString,QStringOrQPair> & result,
+ TQMap<TQString,QStringOrQPair> & 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<QString,QStringOrQPair> maybeParameter;
+ QPair<TQString,QStringOrQPair> 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
@@ -1199,8 +1199,8 @@ bool parseRawParameterList( const char* & scursor, const char * const send,
static void decodeRFC2231Value( Codec* & rfc2231Codec,
- QTextCodec* & textcodec,
- bool isContinuation, QString & value,
+ TQTextCodec* & textcodec,
+ bool isContinuation, TQString & value,
QPair<const char*,int> & source ) {
//
@@ -1223,11 +1223,11 @@ static void decodeRFC2231Value( Codec* & rfc2231Codec,
// take the whole value to be in latin-1:
KMIME_WARN << "No charset in extended-initial-value. "
"Assuming \"iso-8859-1\"." << endl;
- value += QString::fromLatin1( decBegin, source.second );
+ value += TQString::fromLatin1( decBegin, source.second );
return;
}
- QCString charset( decBegin, decCursor - decBegin + 1 );
+ TQCString charset( decBegin, decCursor - decBegin + 1 );
const char * oldDecCursor = ++decCursor;
// find the second single quote (we ignore the language tag):
@@ -1263,7 +1263,7 @@ static void decodeRFC2231Value( Codec* & rfc2231Codec,
}
if ( !textcodec ) {
- value += QString::fromLatin1( decCursor, decEnd - decCursor );
+ value += TQString::fromLatin1( decCursor, decEnd - decCursor );
return;
}
@@ -1274,9 +1274,9 @@ static void decodeRFC2231Value( Codec* & rfc2231Codec,
// do the decoding:
//
- QByteArray buffer( rfc2231Codec->maxDecodedSizeFor( decEnd - decCursor ) );
- QByteArray::Iterator bit = buffer.begin();
- QByteArray::ConstIterator bend = buffer.end();
+ TQByteArray buffer( rfc2231Codec->maxDecodedSizeFor( decEnd - decCursor ) );
+ TQByteArray::Iterator bit = buffer.begin();
+ TQByteArray::ConstIterator bend = buffer.end();
if ( !dec->decode( decCursor, decEnd, bit, bend ) )
KMIME_WARN << rfc2231Codec->name()
@@ -1295,9 +1295,9 @@ static void decodeRFC2231Value( Codec* & rfc2231Codec,
// exceeds 10 (other-sections then becomes *xy, ie. two digits)
bool parseParameterList( const char* & scursor, const char * const send,
- QMap<QString,QString> & result, bool isCRLF ) {
+ TQMap<TQString,TQString> & result, bool isCRLF ) {
// parse the list into raw attribute-value pairs:
- QMap<QString,QStringOrQPair> rawParameterList;
+ TQMap<TQString,QStringOrQPair> rawParameterList;
if (!parseRawParameterList( scursor, send, rawParameterList, isCRLF ) )
return false;
@@ -1305,16 +1305,16 @@ bool parseParameterList( const char* & scursor, const char * const send,
// decode rfc 2231 continuations and alternate charset encoding:
- // NOTE: this code assumes that what QMapIterator delivers is sorted
+ // NOTE: this code assumes that what TQMapIterator delivers is sorted
// by the key!
Codec * rfc2231Codec = 0;
- QTextCodec * textcodec = 0;
- QString attribute;
- QString value;
+ TQTextCodec * textcodec = 0;
+ TQString attribute;
+ TQString value;
enum Modes { NoMode = 0x0, Continued = 0x1, Encoded = 0x2 } mode;
- QMapIterator<QString,QStringOrQPair> it, end = rawParameterList.end();
+ TQMapIterator<TQString,QStringOrQPair> 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 = QString::null;
+ value = TQString::null;
attribute = it.key();
mode = NoMode;
// is the value encoded?
@@ -1348,7 +1348,7 @@ bool parseParameterList( const char* & scursor, const char * const send,
} else {
// not encoded.
if ( (*it).qpair.first )
- value += QString::fromLatin1( (*it).qpair.first, (*it).qpair.second );
+ value += TQString::fromLatin1( (*it).qpair.first, (*it).qpair.second );
else
value += (*it).qstring;
}
@@ -1361,14 +1361,14 @@ bool parseParameterList( const char* & scursor, const char * const send,
// save result already:
result.insert( attribute, value );
// force begin of a new attribute:
- attribute = QString::null;
+ attribute = TQString::null;
}
} else /* it.key().startsWith( attribute ) */ {
//
// continuation
//
- // ignore the section and trust QMap to have sorted the keys:
+ // ignore the section and trust TQMap to have sorted the keys:
if ( it.key().endsWith( asterisk ) ) {
// encoded
decodeRFC2231Value( rfc2231Codec, textcodec,
@@ -1377,7 +1377,7 @@ bool parseParameterList( const char* & scursor, const char * const send,
} else {
// not encoded
if ( (*it).qpair.first )
- value += QString::fromLatin1( (*it).qpair.first, (*it).qpair.second );
+ value += TQString::fromLatin1( (*it).qpair.first, (*it).qpair.second );
else
value += (*it).qstring;
}
@@ -1504,7 +1504,7 @@ static bool parseAlphaNumericTimeZone( const char* & scursor,
}
// don't choke just because we don't happen to know the time zone
- KMIME_WARN_UNKNOWN(time zone,QCString( maybeTimeZone.first, maybeTimeZone.second+1 ));
+ KMIME_WARN_UNKNOWN(time zone,TQCString( maybeTimeZone.first, maybeTimeZone.second+1 ));
secsEastOfGMT = 0;
timeZoneKnown = false;
return true;
diff --git a/libkmime/kmime_header_parsing.h b/libkmime/kmime_header_parsing.h
index 326a7e1ba..c595a4214 100644
--- a/libkmime/kmime_header_parsing.h
+++ b/libkmime/kmime_header_parsing.h
@@ -32,9 +32,9 @@
#ifndef __KMIME_HEADER_PARSING_H__
#define __KMIME_HEADER_PARSING_H__
-#include <qstring.h>
-#include <qpair.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqpair.h>
+#include <tqvaluelist.h>
#include <time.h>
@@ -50,28 +50,28 @@ namespace Types {
// for when we can't make up our mind what to use...
struct KDE_EXPORT QStringOrQPair {
QStringOrQPair() : qstring(), qpair(0,0) {}
- QString qstring;
+ TQString qstring;
QPair<const char*,int> qpair;
};
struct KDE_EXPORT AddrSpec {
- QString asString() const;
- QString localPart;
- QString domain;
+ TQString asString() const;
+ TQString localPart;
+ TQString domain;
};
- typedef QValueList<AddrSpec> AddrSpecList;
+ typedef TQValueList<AddrSpec> AddrSpecList;
struct KDE_EXPORT Mailbox {
- QString displayName;
+ TQString displayName;
AddrSpec addrSpec;
};
- typedef QValueList<Mailbox> MailboxList;
+ typedef TQValueList<Mailbox> MailboxList;
struct KDE_EXPORT Address {
- QString displayName;
+ TQString displayName;
MailboxList mailboxList;
};
- typedef QValueList<Address> AddressList;
+ typedef TQValueList<Address> AddressList;
struct KDE_EXPORT DateTime {
time_t time; // secs since 1.1.1970, 0:00 UTC/GMT
@@ -98,7 +98,7 @@ namespace HeaderParsing {
@return the decoded string the encoded word represented.
*/
bool parseEncodedWord( const char* & scursor, const char * const send,
- QString & result, QCString & language ) KDE_EXPORT;
+ TQString & result, TQCString & language ) KDE_EXPORT;
//
// The parsing squad:
//
@@ -106,34 +106,34 @@ namespace HeaderParsing {
/** You may or may not have already started parsing into the
atom. This function will go on where you left off. */
bool parseAtom( const char* & scursor, const char * const send,
- QString & result, bool allow8Bit=false ) KDE_EXPORT;
+ TQString & result, bool allow8Bit=false ) KDE_EXPORT;
bool parseAtom( const char* & scursor, const char * const send,
QPair<const char*,int> & result, bool allow8Bit=false ) KDE_EXPORT;
/** You may or may not have already started parsing into the
token. This function will go on where you left off. */
bool parseToken( const char* & scursor, const char * const send,
- QString & result, bool allow8Bit=false ) KDE_EXPORT;
+ TQString & result, bool allow8Bit=false ) KDE_EXPORT;
bool parseToken( const char* & scursor, const char * const send,
QPair<const char*,int> & result, bool allow8Bit=false ) KDE_EXPORT;
/** @p scursor must be positioned after the opening openChar. */
bool parseGenericQuotedString( const char* & scursor, const char* const send,
- QString & result, bool isCRLF,
+ TQString & result, bool isCRLF,
const char openChar='"',
const char closeChar='"' ) KDE_EXPORT;
/** @p scursor must be positioned right after the opening '(' */
bool parseComment( const char* & scursor, const char * const send,
- QString & result, bool isCRLF=false, bool reallySave=true ) KDE_EXPORT;
+ TQString & result, bool isCRLF=false, bool reallySave=true ) KDE_EXPORT;
/** You may or may not have already started parsing into the phrase,
but only if it starts with atext. If you setup this function to
parse a phrase starting with an encoded-word or quoted-string,
@p scursor has to point to the char introducing the encoded-word
or quoted-string, resp. */
bool parsePhrase( const char* & scursor, const char * const send,
- QString & result, bool isCRLF=false ) KDE_EXPORT;
+ TQString & result, bool isCRLF=false ) KDE_EXPORT;
/** You may or may not have already started parsing into the initial
atom, but not up to it's end. */
bool parseDotAtom( const char* & scursor, const char * const send,
- QString & result, bool isCRLF=false ) KDE_EXPORT;
+ TQString & result, bool isCRLF=false ) KDE_EXPORT;
/** Eats comment-folding-white-space, skips whitespace, folding and
comments (even nested ones) and stops at the next non-CFWS
@@ -147,9 +147,9 @@ namespace HeaderParsing {
void eatCFWS( const char* & scursor, const char * const send, bool isCRLF ) KDE_EXPORT;
bool parseDomain( const char* & scursor, const char * const send,
- QString & result, bool isCRLF=false ) KDE_EXPORT;
+ TQString & result, bool isCRLF=false ) KDE_EXPORT;
bool parseObsRoute( const char* & scursor, const char * const send,
- QStringList & result,
+ TQStringList & result,
bool isCRLF=false, bool save=false ) KDE_EXPORT;
bool parseAddrSpec( const char* & scursor, const char * const send,
Types::AddrSpec & result, bool isCRLF=false ) KDE_EXPORT;
@@ -165,13 +165,13 @@ namespace HeaderParsing {
Types::AddressList & result, bool isCRLF=false ) KDE_EXPORT;
bool parseParameter( const char* & scursor, const char * const send,
- QPair<QString,Types::QStringOrQPair> & result,
+ QPair<TQString,Types::QStringOrQPair> & result,
bool isCRLF=false ) KDE_EXPORT;
bool parseParameterList( const char* & scursor, const char * const send,
- QMap<QString,QString> & result, bool isCRLF=false ) KDE_EXPORT;
+ TQMap<TQString,TQString> & result, bool isCRLF=false ) KDE_EXPORT;
bool parseRawParameterList( const char* & scursor, const char * const send,
- QMap<QString,Types::QStringOrQPair> & result,
+ TQMap<TQString,Types::QStringOrQPair> & result,
bool isCRLF=false ) KDE_EXPORT;
bool parseTime( const char* & scursor, const char * const send,
diff --git a/libkmime/kmime_headers.cpp b/libkmime/kmime_headers.cpp
index 7ae5b95bf..d4557c122 100644
--- a/libkmime/kmime_headers.cpp
+++ b/libkmime/kmime_headers.cpp
@@ -25,11 +25,11 @@
#include "kqcstringsplitter.h"
-#include <qtextcodec.h>
-#include <qstring.h>
-#include <qcstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqtextcodec.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
#include <kglobal.h>
#include <kcharsets.h>
@@ -47,16 +47,16 @@ namespace KMime {
namespace Headers {
//-----<Base>----------------------------------
-QCString Base::rfc2047Charset()
+TQCString Base::rfc2047Charset()
{
if( (e_ncCS==0) || forceCS() )
return defaultCS();
else
- return QCString(e_ncCS);
+ return TQCString(e_ncCS);
}
-void Base::setRFC2047Charset(const QCString &cs)
+void Base::setRFC2047Charset(const TQCString &cs)
{
e_ncCS=cachedCharset(cs);
}
@@ -68,7 +68,7 @@ bool Base::forceCS()
}
-QCString Base::defaultCS()
+TQCString Base::defaultCS()
{
return ( p_arent!=0 ? p_arent->defaultCharset() : Latin1 );
}
@@ -80,14 +80,14 @@ namespace Generics {
//-----<GUnstructured>-------------------------
-void GUnstructured::from7BitString( const QCString & str )
+void GUnstructured::from7BitString( const TQCString & str )
{
d_ecoded = decodeRFC2047String( str, &e_ncCS, defaultCS(), forceCS() );
}
-QCString GUnstructured::as7BitString( bool withHeaderType )
+TQCString GUnstructured::as7BitString( bool withHeaderType )
{
- QCString result;
+ TQCString result;
if ( withHeaderType )
result = typeIntro();
result += encodeRFC2047String( d_ecoded, e_ncCS ) ;
@@ -95,14 +95,14 @@ QCString GUnstructured::as7BitString( bool withHeaderType )
return result;
}
-void GUnstructured::fromUnicodeString( const QString & str,
- const QCString & suggestedCharset )
+void GUnstructured::fromUnicodeString( const TQString & str,
+ const TQCString & suggestedCharset )
{
d_ecoded = str;
e_ncCS = cachedCharset( suggestedCharset );
}
-QString GUnstructured::asUnicodeString()
+TQString GUnstructured::asUnicodeString()
{
return d_ecoded;
}
@@ -134,14 +134,14 @@ bool MailboxList::parse( const char* & scursor, const char * const send,
// sender := "Sender:" mailbox CRLF
// parse an address-list:
- QValueList<Address> maybeAddressList;
+ TQValueList<Address> maybeAddressList;
if ( !parseAddressList( scursor, send, maybeAddressList, isCRLF ) )
return false;
mMailboxList.clear();
// extract the mailboxes and complain if there are groups:
- QValueList<Address>::Iterator it;
+ TQValueList<Address>::Iterator it;
for ( it = maybeAddressList.begin(); it != maybeAddressList.end() ; ++it ) {
if ( !(*it).displayName.isEmpty() ) {
KMIME_WARN << "mailbox groups in header disallowing them! Name: \""
@@ -178,7 +178,7 @@ bool SingleMailbox::parse( const char* & scursor, const char * const send,
bool AddressList::parse( const char* & scursor, const char * const send,
bool isCRLF ) {
- QValueList<Address> maybeAddressList;
+ TQValueList<Address> maybeAddressList;
if ( !parseAddressList( scursor, send, maybeAddressList, isCRLF ) )
return false;
@@ -202,7 +202,7 @@ bool GToken::parse( const char* & scursor, const char * const send,
QPair<const char*,int> maybeToken;
if ( !parseToken( scursor, send, maybeToken, false /* no 8bit chars */ ) )
return false;
- mToken = QCString( maybeToken.first, maybeToken.second );
+ mToken = TQCString( maybeToken.first, maybeToken.second );
// complain if trailing garbage is found:
eatCFWS( scursor, send, isCRLF );
@@ -231,7 +231,7 @@ bool GPhraseList::parse( const char* & scursor, const char * const send,
// empty entry: ignore.
if ( *scursor != ',' ) { scursor++; continue; }
- QString maybePhrase;
+ TQString maybePhrase;
if ( !parsePhrase( scursor, send, maybePhrase, isCRLF ) )
return false;
mPhraseList.append( maybePhrase );
@@ -254,7 +254,7 @@ bool GPhraseList::parse( const char* & scursor, const char * const send,
bool GDotAtom::parse( const char* & scursor, const char * const send,
bool isCRLF ) {
- QString maybeDotAtom;
+ TQString maybeDotAtom;
if ( !parseDotAtom( scursor, send, maybeDotAtom, isCRLF ) )
return false;
@@ -304,7 +304,7 @@ bool GContentType::parse( const char* & scursor, const char * const send,
if ( !parseToken( scursor, send, maybeMimeType, false /* no 8Bit */ ) )
return false;
- mMimeType = QCString( maybeMimeType.first, maybeMimeType.second ).lower();
+ mMimeType = TQCString( maybeMimeType.first, maybeMimeType.second ).lower();
//
// subtype
@@ -320,7 +320,7 @@ bool GContentType::parse( const char* & scursor, const char * const send,
if ( !parseToken( scursor, send, maybeSubType, false /* no 8bit */ ) )
return false;
- mMimeSubType = QCString( maybeSubType.first, maybeSubType.second ).lower();
+ mMimeSubType = TQCString( maybeSubType.first, maybeSubType.second ).lower();
//
// parameter list
@@ -361,7 +361,7 @@ bool GCISTokenWithParameterList::parse( const char* & scursor,
if ( !parseToken( scursor, send, maybeToken, false /* no 8Bit */ ) )
return false;
- mToken = QCString( maybeToken.first, maybeToken.second ).lower();
+ mToken = TQCString( maybeToken.first, maybeToken.second ).lower();
//
// parameter list
@@ -463,7 +463,7 @@ bool ReturnPath::parse( const char* & scursor, const char * const send, bool isC
// prepare a Null mailbox:
AddrSpec emptyAddrSpec;
- maybeMailbox.displayName = QString::null;
+ maybeMailbox.displayName = TQString::null;
maybeMailbox.addrSpec = emptyAddrSpec;
} else
// check that there was no display-name:
@@ -506,13 +506,13 @@ void Generic::setType(const char *type)
#if !defined(KMIME_NEW_STYLE_CLASSTREE)
//-----<MessageID>-----------------------------
-void MessageID::from7BitString(const QCString &s)
+void MessageID::from7BitString(const TQCString &s)
{
m_id=s;
}
-QCString MessageID::as7BitString(bool incType)
+TQCString MessageID::as7BitString(bool incType)
{
if(incType)
return ( typeIntro()+m_id );
@@ -521,19 +521,19 @@ QCString MessageID::as7BitString(bool incType)
}
-void MessageID::fromUnicodeString(const QString &s, const QCString&)
+void MessageID::fromUnicodeString(const TQString &s, const TQCString&)
{
m_id=s.latin1(); //Message-Ids can only contain us-ascii chars
}
-QString MessageID::asUnicodeString()
+TQString MessageID::asUnicodeString()
{
- return QString::fromLatin1(m_id);
+ return TQString::fromLatin1(m_id);
}
-void MessageID::generate(const QCString &fqdn)
+void MessageID::generate(const TQCString &fqdn)
{
m_id="<"+uniqueString()+"@"+fqdn+">";
}
@@ -544,13 +544,13 @@ void MessageID::generate(const QCString &fqdn)
//-----<Control>-------------------------------
-void Control::from7BitString(const QCString &s)
+void Control::from7BitString(const TQCString &s)
{
c_trlMsg=s;
}
-QCString Control::as7BitString(bool incType)
+TQCString Control::as7BitString(bool incType)
{
if(incType)
return ( typeIntro()+c_trlMsg );
@@ -559,15 +559,15 @@ QCString Control::as7BitString(bool incType)
}
-void Control::fromUnicodeString(const QString &s, const QCString&)
+void Control::fromUnicodeString(const TQString &s, const TQCString&)
{
c_trlMsg=s.latin1();
}
-QString Control::asUnicodeString()
+TQString Control::asUnicodeString()
{
- return QString::fromLatin1(c_trlMsg);
+ return TQString::fromLatin1(c_trlMsg);
}
//-----</Control>------------------------------
@@ -576,15 +576,15 @@ QString Control::asUnicodeString()
#if !defined(KMIME_NEW_STYLE_CLASSTREE)
//-----<AddressField>--------------------------
-void AddressField::from7BitString(const QCString &s)
+void AddressField::from7BitString(const TQCString &s)
{
int pos1=0, pos2=0, type=0;
- QCString n;
+ TQCString n;
//so what do we have here ?
- if(s.find( QRegExp("*@*(*)", false, true) )!=-1) type=2; // From: foo@bar.com (John Doe)
- else if(s.find( QRegExp("*<*@*>", false, true) )!=-1) type=1; // From: John Doe <foo@bar.com>
- else if(s.find( QRegExp("*@*", false, true) )!=-1) type=0; // From: foo@bar.com
+ 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
else { //broken From header => just decode it
n_ame=decodeRFC2047String(s, &e_ncCS, defaultCS(), forceCS());
return;
@@ -631,9 +631,9 @@ void AddressField::from7BitString(const QCString &s)
}
-QCString AddressField::as7BitString(bool incType)
+TQCString AddressField::as7BitString(bool incType)
{
- QCString ret;
+ TQCString ret;
if(incType && type()[0]!='\0')
ret=typeIntro();
@@ -642,7 +642,7 @@ QCString AddressField::as7BitString(bool incType)
ret+=e_mail;
else {
if (isUsAscii(n_ame)) {
- QCString tmp(n_ame.latin1());
+ TQCString tmp(n_ame.latin1());
addQuotes(tmp, false);
ret+=tmp;
} else {
@@ -656,17 +656,17 @@ QCString AddressField::as7BitString(bool incType)
}
-void AddressField::fromUnicodeString(const QString &s, const QCString &cs)
+void AddressField::fromUnicodeString(const TQString &s, const TQCString &cs)
{
int pos1=0, pos2=0, type=0;
- QCString n;
+ TQCString n;
e_ncCS=cachedCharset(cs);
//so what do we have here ?
- if(s.find( QRegExp("*@*(*)", false, true) )!=-1) type=2; // From: foo@bar.com (John Doe)
- else if(s.find( QRegExp("*<*@*>", false, true) )!=-1) type=1; // From: John Doe <foo@bar.com>
- else if(s.find( QRegExp("*@*", false, true) )!=-1) type=0; // From: foo@bar.com
+ 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
else { //broken From header => just copy it
n_ame=s;
return;
@@ -711,12 +711,12 @@ void AddressField::fromUnicodeString(const QString &s, const QCString &cs)
}
-QString AddressField::asUnicodeString()
+TQString AddressField::asUnicodeString()
{
if(n_ame.isEmpty())
- return QString(e_mail);
+ return TQString(e_mail);
else {
- QString s = n_ame;
+ TQString s = n_ame;
if (!e_mail.isEmpty())
s += " <"+e_mail+">";
return s;
@@ -724,13 +724,13 @@ QString AddressField::asUnicodeString()
}
-QCString AddressField::nameAs7Bit()
+TQCString AddressField::nameAs7Bit()
{
return encodeRFC2047String(n_ame, e_ncCS);
}
-void AddressField::setNameFrom7Bit(const QCString &s)
+void AddressField::setNameFrom7Bit(const TQCString &s)
{
n_ame=decodeRFC2047String(s, &e_ncCS, defaultCS(), forceCS());
}
@@ -774,36 +774,36 @@ bool MailCopiesTo::neverCopy()
//-----<Date>----------------------------------
-void Date::from7BitString(const QCString &s)
+void Date::from7BitString(const TQCString &s)
{
t_ime=KRFCDate::parseDate(s);
}
-QCString Date::as7BitString(bool incType)
+TQCString Date::as7BitString(bool incType)
{
if(incType)
return ( typeIntro()+KRFCDate::rfc2822DateString(t_ime) );
else
- return QCString(KRFCDate::rfc2822DateString(t_ime));
+ return TQCString(KRFCDate::rfc2822DateString(t_ime));
}
-void Date::fromUnicodeString(const QString &s, const QCString&)
+void Date::fromUnicodeString(const TQString &s, const TQCString&)
{
- from7BitString( QCString(s.latin1()) );
+ from7BitString( TQCString(s.latin1()) );
}
-QString Date::asUnicodeString()
+TQString Date::asUnicodeString()
{
- return QString::fromLatin1(as7BitString(false));
+ return TQString::fromLatin1(as7BitString(false));
}
-QDateTime Date::qdt()
+TQDateTime Date::qdt()
{
- QDateTime dt;
+ TQDateTime dt;
dt.setTime_t(t_ime);
return dt;
}
@@ -811,7 +811,7 @@ QDateTime Date::qdt()
int Date::ageInDays()
{
- QDate today=QDate::currentDate();
+ TQDate today=TQDate::currentDate();
return ( qdt().date().daysTo(today) );
}
@@ -822,12 +822,12 @@ int Date::ageInDays()
#if !defined(KMIME_NEW_STYLE_CLASSTREE)
//-----<To>------------------------------------
-void To::from7BitString(const QCString &s)
+void To::from7BitString(const TQCString &s)
{
if(a_ddrList)
a_ddrList->clear();
else {
- a_ddrList=new QPtrList<AddressField>;
+ a_ddrList=new TQPtrList<AddressField>;
a_ddrList->setAutoDelete(true);
}
@@ -846,9 +846,9 @@ void To::from7BitString(const QCString &s)
}
-QCString To::as7BitString(bool incType)
+TQCString To::as7BitString(bool incType)
{
- QCString ret;
+ TQCString ret;
if(incType)
ret+=typeIntro();
@@ -865,18 +865,18 @@ QCString To::as7BitString(bool incType)
}
-void To::fromUnicodeString(const QString &s, const QCString &cs)
+void To::fromUnicodeString(const TQString &s, const TQCString &cs)
{
if(a_ddrList)
a_ddrList->clear();
else {
- a_ddrList=new QPtrList<AddressField>;
+ a_ddrList=new TQPtrList<AddressField>;
a_ddrList->setAutoDelete(true);
}
- QStringList l=QStringList::split(",", s);
+ TQStringList l=TQStringList::split(",", s);
- QStringList::Iterator it=l.begin();
+ TQStringList::Iterator it=l.begin();
for(; it!=l.end(); ++it)
a_ddrList->append(new AddressField( p_arent, (*it), cs ));
@@ -884,12 +884,12 @@ void To::fromUnicodeString(const QString &s, const QCString &cs)
}
-QString To::asUnicodeString()
+TQString To::asUnicodeString()
{
if(!a_ddrList)
- return QString::null;
+ return TQString::null;
- QString ret;
+ TQString ret;
AddressField *it=a_ddrList->first();
if (it)
@@ -903,7 +903,7 @@ QString To::asUnicodeString()
void To::addAddress(const AddressField &a)
{
if(!a_ddrList) {
- a_ddrList=new QPtrList<AddressField>;
+ a_ddrList=new TQPtrList<AddressField>;
a_ddrList->setAutoDelete(true);
}
@@ -913,7 +913,7 @@ void To::addAddress(const AddressField &a)
}
-void To::emails(QStrList *l)
+void To::emails(TQStrList *l)
{
l->clear();
@@ -922,7 +922,7 @@ void To::emails(QStrList *l)
l->append( it->email() );
}
-void To::names(QStringList *l)
+void To::names(TQStringList *l)
{
l->clear();
@@ -931,7 +931,7 @@ void To::names(QStringList *l)
l->append( it->name() );
}
-void To::displayNames(QStringList *l)
+void To::displayNames(TQStringList *l)
{
l->clear();
@@ -945,14 +945,14 @@ void To::displayNames(QStringList *l)
//-----<Newsgroups>----------------------------
-void Newsgroups::from7BitString(const QCString &s)
+void Newsgroups::from7BitString(const TQCString &s)
{
g_roups=s;
e_ncCS=cachedCharset("UTF-8");
}
-QCString Newsgroups::as7BitString(bool incType)
+TQCString Newsgroups::as7BitString(bool incType)
{
if(incType)
return (typeIntro()+g_roups);
@@ -961,20 +961,20 @@ QCString Newsgroups::as7BitString(bool incType)
}
-void Newsgroups::fromUnicodeString(const QString &s, const QCString&)
+void Newsgroups::fromUnicodeString(const TQString &s, const TQCString&)
{
g_roups=s.utf8();
e_ncCS=cachedCharset("UTF-8");
}
-QString Newsgroups::asUnicodeString()
+TQString Newsgroups::asUnicodeString()
{
- return QString::fromUtf8(g_roups);
+ return TQString::fromUtf8(g_roups);
}
-QCString Newsgroups::firstGroup()
+TQCString Newsgroups::firstGroup()
{
int pos=0;
if(!g_roups.isEmpty()) {
@@ -985,17 +985,17 @@ QCString Newsgroups::firstGroup()
return g_roups.left(pos);
}
else
- return QCString();
+ return TQCString();
}
-QStringList Newsgroups::getGroups()
+TQStringList Newsgroups::getGroups()
{
- QStringList temp = QStringList::split(',', g_roups);
- QStringList ret;
- QString s;
+ TQStringList temp = TQStringList::split(',', g_roups);
+ TQStringList ret;
+ TQString s;
- for (QStringList::Iterator it = temp.begin(); it != temp.end(); ++it ) {
+ for (TQStringList::Iterator it = temp.begin(); it != temp.end(); ++it ) {
s = (*it).simplifyWhiteSpace();
ret.append(s);
}
@@ -1009,16 +1009,16 @@ QStringList Newsgroups::getGroups()
//-----<Lines>---------------------------------
-void Lines::from7BitString(const QCString &s)
+void Lines::from7BitString(const TQCString &s)
{
l_ines=s.toInt();
e_ncCS=cachedCharset(Latin1);
}
-QCString Lines::as7BitString(bool incType)
+TQCString Lines::as7BitString(bool incType)
{
- QCString num;
+ TQCString num;
num.setNum(l_ines);
if(incType)
@@ -1028,16 +1028,16 @@ QCString Lines::as7BitString(bool incType)
}
-void Lines::fromUnicodeString(const QString &s, const QCString&)
+void Lines::fromUnicodeString(const TQString &s, const TQCString&)
{
l_ines=s.toInt();
e_ncCS=cachedCharset(Latin1);
}
-QString Lines::asUnicodeString()
+TQString Lines::asUnicodeString()
{
- QString num;
+ TQString num;
num.setNum(l_ines);
return num;
@@ -1050,14 +1050,14 @@ QString Lines::asUnicodeString()
#if !defined(KMIME_NEW_STYLE_CLASSTREE)
//-----<References>----------------------------
-void References::from7BitString(const QCString &s)
+void References::from7BitString(const TQCString &s)
{
r_ef=s;
e_ncCS=cachedCharset(Latin1);
}
-QCString References::as7BitString(bool incType)
+TQCString References::as7BitString(bool incType)
{
if(incType)
return ( typeIntro()+r_ef );
@@ -1066,16 +1066,16 @@ QCString References::as7BitString(bool incType)
}
-void References::fromUnicodeString(const QString &s, const QCString&)
+void References::fromUnicodeString(const TQString &s, const TQCString&)
{
r_ef=s.latin1();
e_ncCS=cachedCharset(Latin1);
}
-QString References::asUnicodeString()
+TQString References::asUnicodeString()
{
- return QString::fromLatin1(r_ef);
+ return TQString::fromLatin1(r_ef);
}
@@ -1094,17 +1094,17 @@ int References::count()
}
-QCString References::first()
+TQCString References::first()
{
p_os=-1;
return next();
}
-QCString References::next()
+TQCString References::next()
{
int pos1=0, pos2=0;
- QCString ret;
+ TQCString ret;
if(p_os!=0) {
pos2=r_ef.findRev('>', p_os);
@@ -1121,9 +1121,9 @@ QCString References::next()
}
-QCString References::at(unsigned int i)
+TQCString References::at(unsigned int i)
{
- QCString ret;
+ TQCString ret;
int pos1=0, pos2=0;
unsigned int cnt=0;
@@ -1143,16 +1143,16 @@ QCString References::at(unsigned int i)
}
-void References::append(const QCString &s)
+void References::append(const TQCString &s)
{
- QString temp=r_ef.data();
+ TQString temp=r_ef.data();
temp += " ";
temp += s.data();
- QStringList lst=QStringList::split(' ',temp);
- QRegExp exp("^<.+@.+>$");
+ TQStringList lst=TQStringList::split(' ',temp);
+ TQRegExp exp("^<.+@.+>$");
// remove bogus references
- QStringList::Iterator it = lst.begin();
+ TQStringList::Iterator it = lst.begin();
while (it != lst.end()) {
if (-1==(*it).find(exp))
it = lst.remove(it);
@@ -1174,7 +1174,7 @@ void References::append(const QCString &s)
for (int i=1;i<=3;i++) { // include the last three ids
if (!lst.isEmpty()) {
temp = lst.last();
- r_ef.insert(insPos,(QString(" %1").arg(temp)).latin1());
+ r_ef.insert(insPos,(TQString(" %1").arg(temp)).latin1());
lst.remove(temp);
} else
break;
@@ -1183,7 +1183,7 @@ void References::append(const QCString &s)
while (!lst.isEmpty()) { // now insert the rest, up to 1000 characters
temp = lst.last();
if ((15+r_ef.length()+temp.length())<1000) {
- r_ef.insert(insPos,(QString(" %1").arg(temp)).latin1());
+ r_ef.insert(insPos,(TQString(" %1").arg(temp)).latin1());
lst.remove(temp);
} else
return;
@@ -1196,14 +1196,14 @@ void References::append(const QCString &s)
//-----<UserAgent>-----------------------------
-void UserAgent::from7BitString(const QCString &s)
+void UserAgent::from7BitString(const TQCString &s)
{
u_agent=s;
e_ncCS=cachedCharset(Latin1);
}
-QCString UserAgent::as7BitString(bool incType)
+TQCString UserAgent::as7BitString(bool incType)
{
if(incType)
return ( typeIntro()+u_agent );
@@ -1212,16 +1212,16 @@ QCString UserAgent::as7BitString(bool incType)
}
-void UserAgent::fromUnicodeString(const QString &s, const QCString&)
+void UserAgent::fromUnicodeString(const TQString &s, const TQCString&)
{
u_agent=s.latin1();
e_ncCS=cachedCharset(Latin1);
}
-QString UserAgent::asUnicodeString()
+TQString UserAgent::asUnicodeString()
{
- return QString::fromLatin1(u_agent);
+ return TQString::fromLatin1(u_agent);
}
//-----</UserAgent>----------------------------
@@ -1231,7 +1231,7 @@ QString UserAgent::asUnicodeString()
#if !defined(KMIME_NEW_STYLE_CLASSTREE)
//-----<Content-Type>--------------------------
-void ContentType::from7BitString(const QCString &s)
+void ContentType::from7BitString(const TQCString &s)
{
int pos=s.find(';');
@@ -1251,7 +1251,7 @@ void ContentType::from7BitString(const QCString &s)
}
-QCString ContentType::as7BitString(bool incType)
+TQCString ContentType::as7BitString(bool incType)
{
if(incType)
return (typeIntro()+m_imeType+p_arams);
@@ -1260,19 +1260,19 @@ QCString ContentType::as7BitString(bool incType)
}
-void ContentType::fromUnicodeString(const QString &s, const QCString&)
+void ContentType::fromUnicodeString(const TQString &s, const TQCString&)
{
- from7BitString( QCString(s.latin1()) );
+ from7BitString( TQCString(s.latin1()) );
}
-QString ContentType::asUnicodeString()
+TQString ContentType::asUnicodeString()
{
- return QString::fromLatin1(as7BitString(false));
+ return TQString::fromLatin1(as7BitString(false));
}
-QCString ContentType::mediaType()
+TQCString ContentType::mediaType()
{
int pos=m_imeType.find('/');
if(pos==-1)
@@ -1282,17 +1282,17 @@ QCString ContentType::mediaType()
}
-QCString ContentType::subType()
+TQCString ContentType::subType()
{
int pos=m_imeType.find('/');
if(pos==-1)
- return QCString();
+ return TQCString();
else
return m_imeType.mid(pos, m_imeType.length()-pos);
}
-void ContentType::setMimeType(const QCString &s)
+void ContentType::setMimeType(const TQCString &s)
{
p_arams.resize(0);
m_imeType=s;
@@ -1357,9 +1357,9 @@ bool ContentType::isPartial()
}
-QCString ContentType::charset()
+TQCString ContentType::charset()
{
- QCString ret=getParameter("charset");
+ TQCString ret=getParameter("charset");
if( ret.isEmpty() || forceCS() ) { //we return the default-charset if necessary
ret=defaultCS();
}
@@ -1367,37 +1367,37 @@ QCString ContentType::charset()
}
-void ContentType::setCharset(const QCString &s)
+void ContentType::setCharset(const TQCString &s)
{
setParameter("charset", s);
}
-QCString ContentType::boundary()
+TQCString ContentType::boundary()
{
return getParameter("boundary");
}
-void ContentType::setBoundary(const QCString &s)
+void ContentType::setBoundary(const TQCString &s)
{
setParameter("boundary", s, true);
}
-QString ContentType::name()
+TQString ContentType::name()
{
const char *dummy=0;
return ( decodeRFC2047String(getParameter("name"), &dummy, defaultCS(), forceCS()) );
}
-void ContentType::setName(const QString &s, const QCString &cs)
+void ContentType::setName(const TQString &s, const TQCString &cs)
{
e_ncCS=cs;
if (isUsAscii(s)) {
- QCString tmp(s.latin1());
+ TQCString tmp(s.latin1());
addQuotes(tmp, true);
setParameter("name", tmp, false);
} else {
@@ -1407,13 +1407,13 @@ void ContentType::setName(const QString &s, const QCString &cs)
}
-QCString ContentType::id()
+TQCString ContentType::id()
{
return (getParameter("id"));
}
-void ContentType::setId(const QCString &s)
+void ContentType::setId(const TQCString &s)
{
setParameter("id", s, true);
}
@@ -1421,7 +1421,7 @@ void ContentType::setId(const QCString &s)
int ContentType::partialNumber()
{
- QCString p=getParameter("number");
+ TQCString p=getParameter("number");
if(!p.isEmpty())
return p.toInt();
else
@@ -1431,7 +1431,7 @@ int ContentType::partialNumber()
int ContentType::partialCount()
{
- QCString p=getParameter("total");
+ TQCString p=getParameter("total");
if(!p.isEmpty())
return p.toInt();
else
@@ -1441,7 +1441,7 @@ int ContentType::partialCount()
void ContentType::setPartialParams(int total, int number)
{
- QCString num;
+ TQCString num;
num.setNum(number);
setParameter("number", num);
num.setNum(total);
@@ -1449,9 +1449,9 @@ void ContentType::setPartialParams(int total, int number)
}
-QCString ContentType::getParameter(const char *name)
+TQCString ContentType::getParameter(const char *name)
{
- QCString ret;
+ TQCString ret;
int pos1=0, pos2=0;
pos1=p_arams.find(name, 0, false);
if(pos1!=-1) {
@@ -1465,10 +1465,10 @@ QCString ContentType::getParameter(const char *name)
}
-void ContentType::setParameter(const QCString &name, const QCString &value, bool doubleQuotes)
+void ContentType::setParameter(const TQCString &name, const TQCString &value, bool doubleQuotes)
{
int pos1=0, pos2=0;
- QCString param;
+ TQCString param;
if(doubleQuotes)
param=name+"=\""+value+"\"";
@@ -1505,9 +1505,9 @@ static const encTableType encTable[] = { { "7Bit", CE7Bit },
{ 0, 0} };
-void CTEncoding::from7BitString(const QCString &s)
+void CTEncoding::from7BitString(const TQCString &s)
{
- QCString stripped(s.simplifyWhiteSpace());
+ TQCString stripped(s.simplifyWhiteSpace());
c_te=CE7Bit;
for(int i=0; encTable[i].s!=0; i++)
if(strcasecmp(stripped.data(), encTable[i].s)==0) {
@@ -1520,9 +1520,9 @@ void CTEncoding::from7BitString(const QCString &s)
}
-QCString CTEncoding::as7BitString(bool incType)
+TQCString CTEncoding::as7BitString(bool incType)
{
- QCString str;
+ TQCString str;
for(int i=0; encTable[i].s!=0; i++)
if(c_te==encTable[i].e) {
str=encTable[i].s;
@@ -1536,15 +1536,15 @@ QCString CTEncoding::as7BitString(bool incType)
}
-void CTEncoding::fromUnicodeString(const QString &s, const QCString&)
+void CTEncoding::fromUnicodeString(const TQString &s, const TQCString&)
{
- from7BitString( QCString(s.latin1()) );
+ from7BitString( TQCString(s.latin1()) );
}
-QString CTEncoding::asUnicodeString()
+TQString CTEncoding::asUnicodeString()
{
- return QString::fromLatin1(as7BitString(false));
+ return TQString::fromLatin1(as7BitString(false));
}
//-----</CTEncoding>---------------------------
@@ -1553,14 +1553,14 @@ QString CTEncoding::asUnicodeString()
//-----<CDisposition>--------------------------
-void CDisposition::from7BitString(const QCString &s)
+void CDisposition::from7BitString(const TQCString &s)
{
if(strncasecmp(s.data(), "attachment", 10)==0)
d_isp=CDattachment;
else d_isp=CDinline;
int pos=s.find("filename=", 0, false);
- QCString fn;
+ TQCString fn;
if(pos>-1) {
pos+=9;
fn=s.mid(pos, s.length()-pos);
@@ -1570,9 +1570,9 @@ void CDisposition::from7BitString(const QCString &s)
}
-QCString CDisposition::as7BitString(bool incType)
+TQCString CDisposition::as7BitString(bool incType)
{
- QCString ret;
+ TQCString ret;
if(d_isp==CDattachment)
ret="attachment";
else
@@ -1580,7 +1580,7 @@ QCString CDisposition::as7BitString(bool incType)
if(!f_ilename.isEmpty()) {
if (isUsAscii(f_ilename)) {
- QCString tmp(f_ilename.latin1());
+ TQCString tmp(f_ilename.latin1());
addQuotes(tmp, true);
ret+="; filename="+tmp;
} else {
@@ -1596,7 +1596,7 @@ QCString CDisposition::as7BitString(bool incType)
}
-void CDisposition::fromUnicodeString(const QString &s, const QCString &cs)
+void CDisposition::fromUnicodeString(const TQString &s, const TQCString &cs)
{
if(strncasecmp(s.latin1(), "attachment", 10)==0)
d_isp=CDattachment;
@@ -1613,9 +1613,9 @@ void CDisposition::fromUnicodeString(const QString &s, const QCString &cs)
}
-QString CDisposition::asUnicodeString()
+TQString CDisposition::asUnicodeString()
{
- QString ret;
+ TQString ret;
if(d_isp==CDattachment)
ret="attachment";
else
diff --git a/libkmime/kmime_headers.h b/libkmime/kmime_headers.h
index 779cd341a..2ba0e1b8d 100644
--- a/libkmime/kmime_headers.h
+++ b/libkmime/kmime_headers.h
@@ -24,14 +24,14 @@
#include "kmime_header_parsing.h"
-#include <qstring.h>
-#include <qstrlist.h>
-#include <qstringlist.h>
-#include <qregexp.h>
-#include <qdatetime.h>
-#include <qasciidict.h>
-#include <qmap.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqstrlist.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
+#include <tqdatetime.h>
+#include <tqasciidict.h>
+#include <tqmap.h>
+#include <tqptrlist.h>
#include <time.h>
@@ -62,16 +62,16 @@ enum contentDisposition { CDinline,
CDparallel };
//often used charset
-static const QCString Latin1("ISO-8859-1");
+static const TQCString Latin1("ISO-8859-1");
#define mk_trivial_subclass_with_name( subclass, subclassName, baseclass ) \
class subclass : public Generics::baseclass { \
public: \
subclass() : Generics::baseclass() {} \
subclass( Content * p ) : Generics::baseclass( p ) {} \
- subclass( Content * p, const QCString & s ) \
+ subclass( Content * p, const TQCString & s ) \
: Generics::baseclass( p ) { from7BitString( s ); } \
- subclass( Content * p, const QString & s, const QCString & cs ) \
+ subclass( Content * p, const TQString & s, const TQCString & cs ) \
: Generics::baseclass( p ) { fromUnicodeString( s, cs ); } \
~subclass() {} \
\
@@ -86,9 +86,9 @@ class subclass : public Generics::baseclass { \
public: \
subclass() : Generics::baseclass() {} \
subclass( Content * p ) : Generics::baseclass( p ) {} \
- subclass( Content * p, const QCString & s ) \
+ subclass( Content * p, const TQCString & s ) \
: Generics::baseclass( p ) { from7BitString( s ); } \
- subclass( Content * p, const QString & s, const QCString & cs ) \
+ subclass( Content * p, const TQString & s, const TQCString & cs ) \
: Generics::baseclass( p ) { fromUnicodeString( s, cs ); } \
~subclass() {} \
\
@@ -111,7 +111,7 @@ mk_parsing_subclass_with_name( subclass, subclass, baseclass )
class KDE_EXPORT Base {
public:
- typedef QPtrList<Base> List;
+ typedef TQPtrList<Base> List;
/** Create an empty header. */
Base() : e_ncCS(0), p_arent(0) {}
@@ -131,30 +131,30 @@ class KDE_EXPORT Base {
/** Parse the given string. Take care of RFC2047-encoded
strings. A default charset is given. If the last parameter
is true the default charset is used in any case */
- virtual void from7BitString(const QCString&) {}
+ virtual void from7BitString(const TQCString&) {}
/** Return the encoded header. The parameter specifies
whether the header-type should be included. */
- virtual QCString as7BitString(bool=true) { return QCString(); }
+ virtual TQCString as7BitString(bool=true) { return TQCString(); }
/** Return the charset that is used for RFC2047-encoding */
- QCString rfc2047Charset();
+ TQCString rfc2047Charset();
/** Set the charset for RFC2047-encoding */
- void setRFC2047Charset(const QCString &cs);
+ void setRFC2047Charset(const TQCString &cs);
/** Return the default charset */
- QCString defaultCS();
+ TQCString defaultCS();
/** Return if the default charset is mandatory */
bool forceCS();
/** Parse the given string and set the charset. */
- virtual void fromUnicodeString(const QString&, const QCString&) {}
+ virtual void fromUnicodeString(const TQString&, const TQCString&) {}
/** Return the decoded content of the header without
the header-type. */
- virtual QString asUnicodeString() { return QString(); }
+ virtual TQString asUnicodeString() { return TQString(); }
/** Delete */
virtual void clear() {}
@@ -175,7 +175,7 @@ class KDE_EXPORT Base {
bool isXHeader() { return (strncmp(type(), "X-", 2)==0); }
protected:
- QCString typeIntro() { return (QCString(type())+": "); }
+ TQCString typeIntro() { return (TQCString(type())+": "); }
const char *e_ncCS;
Content *p_arent;
@@ -218,24 +218,24 @@ class KDE_EXPORT GUnstructured : public Base {
public:
GUnstructured() : Base() {}
GUnstructured( Content * p ) : Base( p ) {}
- GUnstructured( Content * p, const QCString & s )
+ GUnstructured( Content * p, const TQCString & s )
: Base( p ) { from7BitString(s); }
- GUnstructured( Content * p, const QString & s, const QCString & cs )
+ GUnstructured( Content * p, const TQString & s, const TQCString & cs )
: Base( p ) { fromUnicodeString( s, cs ); }
~GUnstructured() {}
- virtual void from7BitString( const QCString& str );
- virtual QCString as7BitString( bool withHeaderType=true );
+ virtual void from7BitString( const TQCString& str );
+ virtual TQCString as7BitString( bool withHeaderType=true );
- virtual void fromUnicodeString( const QString & str,
- const QCString & suggestedCharset);
- virtual QString asUnicodeString();
+ virtual void fromUnicodeString( const TQString & str,
+ const TQCString & suggestedCharset);
+ virtual TQString asUnicodeString();
virtual void clear() { d_ecoded.truncate(0); }
virtual bool isEmpty() { return (d_ecoded.isEmpty()); }
private:
- QString d_ecoded;
+ TQString d_ecoded;
};
/** This is the base class for all structured header fields. It
@@ -270,9 +270,9 @@ class KDE_EXPORT GStructured : public Base {
public:
GStructured() : Base() {}
GStructured( Content * p ) : Base( p ) {}
- GStructured( Content * p, const QCString & s )
+ GStructured( Content * p, const TQCString & s )
: Base( p ) { from7BitString(s); }
- GStructured( Content * p, const QString & s, const QCString & cs )
+ GStructured( Content * p, const TQString & s, const TQCString & cs )
: Base( p ) { fromUnicodeString( s, cs ); }
~GStructured() {}
@@ -281,21 +281,21 @@ protected:
#if 0
// the assembly squad:
- bool writeAtom( char* & dcursor, const char * const dend, const QString & input );
+ bool writeAtom( char* & dcursor, const char * const dend, const TQString & input );
bool writeAtom( char* & dcursor, const char * const dend,
const QPair<const char*,int> & input );
- bool writeToken( char* & dcursor, const char * const dend, const QString & input );
+ bool writeToken( char* & dcursor, const char * const dend, const TQString & input );
bool writeToken( char* & dcursor, const char * const dend,
const QPair<const char*int> & input );
bool writeGenericQuotedString( char* & dcursor, const char * const dend,
- const QString & input, bool withCRLF=false );
+ const TQString & input, bool withCRLF=false );
bool writeComment( char* & dcursor, const char * const dend,
- const QString & input, bool withCRLF=false );
+ const TQString & input, bool withCRLF=false );
bool writePhrase( char* & dcursor, const char * const dend,
- const QString & input, bool withCRLF=false );
+ const TQString & input, bool withCRLF=false );
bool writeDotAtom( char* & dcursor, const char * const dend,
- const QString & input, bool withCRLF=false );
+ const TQString & input, bool withCRLF=false );
#endif
};
@@ -304,9 +304,9 @@ class KDE_EXPORT GAddress : public GStructured {
public:
GAddress() : GStructured() {}
GAddress( Content * p ) : GStructured( p ) {}
- GAddress( Content * p, const QCString & s )
+ GAddress( Content * p, const TQCString & s )
: GStructured( p ) { from7BitString(s); }
- GAddress( Content * p, const QString & s, const QCString & cs )
+ GAddress( Content * p, const TQString & s, const TQCString & cs )
: GStructured( p ) { fromUnicodeString( s, cs ); }
~GAddress() {}
@@ -320,9 +320,9 @@ class KDE_EXPORT MailboxList : public GAddress {
public:
MailboxList() : GAddress() {}
MailboxList( Content * p ) : GAddress( p ) {}
- MailboxList( Content * p, const QCString & s )
+ MailboxList( Content * p, const TQCString & s )
: GAddress( p ) { from7BitString(s); }
- MailboxList( Content * p, const QString & s, const QCString & cs )
+ MailboxList( Content * p, const TQString & s, const TQCString & cs )
: GAddress( p ) { fromUnicodeString( s, cs ); }
~MailboxList() {}
@@ -330,7 +330,7 @@ protected:
bool parse( const char* & scursor, const char * const send, bool isCRLF=false );
/** The list of mailboxes */
- QValueList<Types::Mailbox> mMailboxList;
+ TQValueList<Types::Mailbox> mMailboxList;
};
@@ -344,9 +344,9 @@ class KDE_EXPORT AddressList : public GAddress {
public:
AddressList() : GAddress() {}
AddressList( Content * p ) : GAddress( p ) {}
- AddressList( Content * p, const QCString & s )
+ AddressList( Content * p, const TQCString & s )
: GAddress( p ) { from7BitString(s); }
- AddressList( Content * p, const QString & s, const QCString & cs )
+ AddressList( Content * p, const TQString & s, const TQCString & cs )
: GAddress( p ) { fromUnicodeString( s, cs ); }
~AddressList() {}
@@ -354,7 +354,7 @@ protected:
bool parse( const char* & scursor, const char * const send, bool isCRLF=false );
/** The list of addresses */
- QValueList<Types::Address> mAddressList;
+ TQValueList<Types::Address> mAddressList;
};
/** Base class for headers which deal with a list of msg-id's */
@@ -362,9 +362,9 @@ class KDE_EXPORT GIdent : public GAddress {
public:
GIdent() : GAddress() {}
GIdent( Content * p ) : GAddress( p ) {}
- GIdent( Content * p, const QCString & s )
+ GIdent( Content * p, const TQCString & s )
: GAddress( p ) { from7BitString(s); }
- GIdent( Content * p, const QString & s, const QCString & cs )
+ GIdent( Content * p, const TQString & s, const TQCString & cs )
: GAddress( p ) { fromUnicodeString( s, cs ); }
~GIdent() {}
@@ -372,7 +372,7 @@ protected:
bool parse( const char* & scursor, const char * const send, bool isCRLF=false );
/** The list of msg-id's */
- QValueList<Types::AddrSpec> mMsgIdList;
+ TQValueList<Types::AddrSpec> mMsgIdList;
};
/** Base class for headers which deal with a list of msg-id's */
@@ -383,16 +383,16 @@ class KDE_EXPORT GToken : public GStructured {
public:
GToken() : GStructured() {}
GToken( Content * p ) : GStructured( p ) {}
- GToken( Content * p, const QCString & s )
+ GToken( Content * p, const TQCString & s )
: GStructured( p ) { from7BitString(s); }
- GToken( Content * p, const QString & s, const QCString & cs )
+ GToken( Content * p, const TQString & s, const TQCString & cs )
: GStructured( p ) { fromUnicodeString( s, cs ); }
~GToken() {}
protected:
bool parse( const char* & scursor, const char * const send, bool isCRLF=false );
- QCString mToken;
+ TQCString mToken;
};
@@ -400,46 +400,46 @@ class KDE_EXPORT GPhraseList : public GStructured {
public:
GPhraseList() : GStructured() {}
GPhraseList( Content * p ) : GStructured( p ) {}
- GPhraseList( Content * p, const QCString & s )
+ GPhraseList( Content * p, const TQCString & s )
: GStructured( p ) { from7BitString(s); }
- GPhraseList( Content * p, const QString & s, const QCString & cs )
+ GPhraseList( Content * p, const TQString & s, const TQCString & cs )
: GStructured( p ) { fromUnicodeString( s, cs ); }
~GPhraseList() {}
protected:
bool parse( const char* & scursor, const char * const send, bool isCRLF=false );
- QStringList mPhraseList;
+ TQStringList mPhraseList;
};
class KDE_EXPORT GDotAtom : public GStructured {
public:
GDotAtom() : GStructured() {}
GDotAtom( Content * p ) : GStructured( p ) {}
- GDotAtom( Content * p, const QCString & s )
+ GDotAtom( Content * p, const TQCString & s )
: GStructured( p ) { from7BitString(s); }
- GDotAtom( Content * p, const QString & s, const QCString & cs )
+ GDotAtom( Content * p, const TQString & s, const TQCString & cs )
: GStructured( p ) { fromUnicodeString( s, cs ); }
~GDotAtom() {}
protected:
bool parse( const char* & scursor, const char * const send, bool isCRLF=false );
- QString mDotAtom;
+ TQString mDotAtom;
};
class KDE_EXPORT GParametrized : public GStructured {
public:
GParametrized() : GStructured() {}
GParametrized( Content * p ) : GStructured( p ) {}
- GParametrized( Content * p, const QCString & s )
+ GParametrized( Content * p, const TQCString & s )
: GStructured( p ) { from7BitString(s); }
- GParametrized( Content * p, const QString & s, const QCString & cs )
+ GParametrized( Content * p, const TQString & s, const TQCString & cs )
: GStructured( p ) { fromUnicodeString( s, cs ); }
~GParametrized() {}
protected:
- QMap<QString,QString> mParameterHash;
+ TQMap<TQString,TQString> mParameterHash;
private:
};
@@ -448,17 +448,17 @@ class KDE_EXPORT GContentType : public GParametrized {
public:
GContentType() : GParametrized() {}
GContentType( Content * p ) : GParametrized( p ) {}
- GContentType( Content * p, const QCString & s )
+ GContentType( Content * p, const TQCString & s )
: GParametrized( p ) { from7BitString(s); }
- GContentType( Content * p, const QString & s, const QCString & cs )
+ GContentType( Content * p, const TQString & s, const TQCString & cs )
: GParametrized( p ) { fromUnicodeString( s, cs ); }
~GContentType() {}
protected:
bool parse( const char* & scursor, const char * const send, bool isCRLF=false );
- QCString mMimeType;
- QCString mMimeSubType;
+ TQCString mMimeType;
+ TQCString mMimeSubType;
};
@@ -466,16 +466,16 @@ class KDE_EXPORT GCISTokenWithParameterList : public GParametrized {
public:
GCISTokenWithParameterList() : GParametrized() {}
GCISTokenWithParameterList( Content * p ) : GParametrized( p ) {}
- GCISTokenWithParameterList( Content * p, const QCString & s )
+ GCISTokenWithParameterList( Content * p, const TQCString & s )
: GParametrized( p ) { from7BitString(s); }
- GCISTokenWithParameterList( Content * p, const QString & s, const QCString & cs )
+ GCISTokenWithParameterList( Content * p, const TQString & s, const TQCString & cs )
: GParametrized( p ) { fromUnicodeString( s, cs ); }
~GCISTokenWithParameterList() {}
protected:
bool parse( const char* & scursor, const char * const send, bool isCRLF=false );
- QCString mToken;
+ TQCString mToken;
};
@@ -493,9 +493,9 @@ class KDE_EXPORT ReturnPath : public Generics::GAddress {
public:
ReturnPath() : Generics::GAddress() {}
ReturnPath( Content * p ) : Generics::GAddress( p ) {}
- ReturnPath( Content * p, const QCString & s )
+ ReturnPath( Content * p, const TQCString & s )
: Generics::GAddress( p ) { from7BitString(s); }
- ReturnPath( Content * p, const QString & s, const QCString & cs )
+ ReturnPath( Content * p, const TQString & s, const TQCString & cs )
: Generics::GAddress( p ) { fromUnicodeString( s, cs ); }
~ReturnPath() {}
@@ -573,9 +573,9 @@ class KDE_EXPORT Generic : public Generics::GUnstructured {
: Generics::GUnstructured(), t_ype(0) { setType(t); }
Generic(const char *t, Content *p)
: Generics::GUnstructured( p ), t_ype(0) { setType(t); }
- Generic(const char *t, Content *p, const QCString &s)
+ Generic(const char *t, Content *p, const TQCString &s)
: Generics::GUnstructured( p, s ), t_ype(0) { setType(t); }
- Generic(const char *t, Content *p, const QString &s, const QCString &cs)
+ Generic(const char *t, Content *p, const TQString &s, const TQCString &cs)
: Generics::GUnstructured( p, s, cs ), t_ype(0) { setType(t); }
~Generic() { delete[] t_ype; }
@@ -596,16 +596,16 @@ class KDE_EXPORT Subject : public Generics::GUnstructured {
public:
Subject() : Generics::GUnstructured() {}
Subject( Content * p ) : Generics::GUnstructured( p ) {}
- Subject( Content * p, const QCString & s )
+ Subject( Content * p, const TQCString & s )
: Generics::GUnstructured( p, s ) {}
- Subject( Content * p, const QString & s, const QCString & cs )
+ Subject( Content * p, const TQString & s, const TQCString & cs )
: Generics::GUnstructured( p, s, cs ) {}
~Subject() {}
virtual const char* type() { return "Subject"; }
bool isReply() {
- return ( asUnicodeString().find( QString("Re:"), 0, false ) == 0 );
+ return ( asUnicodeString().find( TQString("Re:"), 0, false ) == 0 );
}
};
@@ -615,9 +615,9 @@ class KDE_EXPORT Organization : public Generics::GUnstructured {
public:
Organization() : Generics::GUnstructured() {}
Organization( Content * p ) : Generics::GUnstructured( p ) {}
- Organization( Content * p, const QCString & s )
+ Organization( Content * p, const TQCString & s )
: Generics::GUnstructured( p, s ) {};
- Organization( Content * p, const QString & s, const QCString & cs)
+ Organization( Content * p, const TQString & s, const TQCString & cs)
: Generics::GUnstructured( p, s, cs ) {}
~Organization() {}
@@ -639,14 +639,14 @@ class KDE_EXPORT Control : public Base {
public:
Control() : Base() {}
Control(Content *p) : Base(p) {}
- Control(Content *p, const QCString &s) : Base(p) { from7BitString(s); }
- Control(Content *p, const QString &s) : Base(p) { fromUnicodeString(s, Latin1); }
+ Control(Content *p, const TQCString &s) : Base(p) { from7BitString(s); }
+ Control(Content *p, const TQString &s) : Base(p) { fromUnicodeString(s, Latin1); }
~Control() {}
- virtual void from7BitString(const QCString &s);
- virtual QCString as7BitString(bool incType=true);
- virtual void fromUnicodeString(const QString &s, const QCString&);
- virtual QString asUnicodeString();
+ virtual void from7BitString(const TQCString &s);
+ virtual TQCString as7BitString(bool incType=true);
+ virtual void fromUnicodeString(const TQString &s, const TQCString&);
+ virtual TQString asUnicodeString();
virtual void clear() { c_trlMsg.truncate(0); }
virtual bool isEmpty() { return (c_trlMsg.isEmpty()); }
virtual const char* type() { return "Control"; }
@@ -654,7 +654,7 @@ class KDE_EXPORT Control : public Base {
bool isCancel() { return (c_trlMsg.find("cancel", 0, false)!=-1); }
protected:
- QCString c_trlMsg;
+ TQCString c_trlMsg;
};
@@ -665,14 +665,14 @@ class KDE_EXPORT Date : public Base {
Date() : Base(), t_ime(0) {}
Date(Content *p) : Base(p), t_ime(0) {}
Date(Content *p, time_t t) : Base(p), t_ime(t) {}
- Date(Content *p, const QCString &s) : Base(p) { from7BitString(s); }
- Date(Content *p, const QString &s) : Base(p) { fromUnicodeString(s, Latin1); }
+ Date(Content *p, const TQCString &s) : Base(p) { from7BitString(s); }
+ Date(Content *p, const TQString &s) : Base(p) { fromUnicodeString(s, Latin1); }
~Date() {}
- virtual void from7BitString(const QCString &s);
- virtual QCString as7BitString(bool incType=true);
- virtual void fromUnicodeString(const QString &s, const QCString&);
- virtual QString asUnicodeString();
+ virtual void from7BitString(const TQCString &s);
+ virtual TQCString as7BitString(bool incType=true);
+ virtual void fromUnicodeString(const TQString &s, const TQCString&);
+ virtual TQString asUnicodeString();
virtual void clear() { t_ime=0; }
virtual bool isEmpty() { return (t_ime==0); }
virtual const char* type() { return "Date"; }
@@ -680,7 +680,7 @@ class KDE_EXPORT Date : public Base {
time_t unixTime() { return t_ime; }
void setUnixTime(time_t t) { t_ime=t; }
void setUnixTime() { t_ime=time(0); }
- QDateTime qdt();
+ TQDateTime qdt();
int ageInDays();
protected:
@@ -695,24 +695,24 @@ class KDE_EXPORT Newsgroups : public Base {
public:
Newsgroups() : Base() {}
Newsgroups(Content *p) : Base(p) {}
- Newsgroups(Content *p, const QCString &s) : Base(p) { from7BitString(s); }
- Newsgroups(Content *p, const QString &s) : Base(p) { fromUnicodeString(s, Latin1); }
+ Newsgroups(Content *p, const TQCString &s) : Base(p) { from7BitString(s); }
+ Newsgroups(Content *p, const TQString &s) : Base(p) { fromUnicodeString(s, Latin1); }
~Newsgroups() {}
- virtual void from7BitString(const QCString &s);
- virtual QCString as7BitString(bool incType=true);
- virtual void fromUnicodeString(const QString &s, const QCString&);
- virtual QString asUnicodeString();
+ virtual void from7BitString(const TQCString &s);
+ virtual TQCString as7BitString(bool incType=true);
+ virtual void fromUnicodeString(const TQString &s, const TQCString&);
+ virtual TQString asUnicodeString();
virtual void clear() { g_roups.resize(0); }
virtual bool isEmpty() { return g_roups.isEmpty(); }
virtual const char* type() { return "Newsgroups"; }
- QCString firstGroup();
+ TQCString firstGroup();
bool isCrossposted() { return ( g_roups.find(',')>-1 ); }
- QStringList getGroups();
+ TQStringList getGroups();
protected:
- QCString g_roups;
+ TQCString g_roups;
};
@@ -723,8 +723,8 @@ class KDE_EXPORT FollowUpTo : public Newsgroups {
public:
FollowUpTo() : Newsgroups() {}
FollowUpTo(Content *p) : Newsgroups(p) {}
- FollowUpTo(Content *p, const QCString &s) : Newsgroups(p,s) {}
- FollowUpTo(Content *p, const QString &s) : Newsgroups(p,s) {}
+ FollowUpTo(Content *p, const TQCString &s) : Newsgroups(p,s) {}
+ FollowUpTo(Content *p, const TQString &s) : Newsgroups(p,s) {}
~FollowUpTo() {}
virtual const char* type() { return "Followup-To"; }
@@ -739,14 +739,14 @@ class KDE_EXPORT Lines : public Base {
Lines() : Base(),l_ines(-1) {}
Lines(Content *p) : Base(p),l_ines(-1) {}
Lines(Content *p, unsigned int i) : Base(p),l_ines(i) {}
- Lines(Content *p, const QCString &s) : Base(p) { from7BitString(s); }
- Lines(Content *p, const QString &s) : Base(p) { fromUnicodeString(s, Latin1); }
+ Lines(Content *p, const TQCString &s) : Base(p) { from7BitString(s); }
+ Lines(Content *p, const TQString &s) : Base(p) { fromUnicodeString(s, Latin1); }
~Lines() {}
- virtual void from7BitString(const QCString &s);
- virtual QCString as7BitString(bool incType=true);
- virtual void fromUnicodeString(const QString &s, const QCString&);
- virtual QString asUnicodeString();
+ virtual void from7BitString(const TQCString &s);
+ virtual TQCString as7BitString(bool incType=true);
+ virtual void fromUnicodeString(const TQString &s, const TQCString&);
+ virtual TQString asUnicodeString();
virtual void clear() { l_ines=-1; }
virtual bool isEmpty() { return (l_ines==-1); }
virtual const char* type() { return "Lines"; }
@@ -767,20 +767,20 @@ class KDE_EXPORT UserAgent : public Base {
public:
UserAgent() : Base() {}
UserAgent(Content *p) : Base(p) {}
- UserAgent(Content *p, const QCString &s) : Base(p) { from7BitString(s); }
- UserAgent(Content *p, const QString &s) : Base(p) { fromUnicodeString(s, Latin1); }
+ UserAgent(Content *p, const TQCString &s) : Base(p) { from7BitString(s); }
+ UserAgent(Content *p, const TQString &s) : Base(p) { fromUnicodeString(s, Latin1); }
~UserAgent() {}
- virtual void from7BitString(const QCString &s);
- virtual QCString as7BitString(bool incType=true);
- virtual void fromUnicodeString(const QString &s, const QCString&);
- virtual QString asUnicodeString();
+ virtual void from7BitString(const TQCString &s);
+ virtual TQCString as7BitString(bool incType=true);
+ virtual void fromUnicodeString(const TQString &s, const TQCString&);
+ virtual TQString asUnicodeString();
virtual void clear() { u_agent.resize(0); }
virtual bool isEmpty() { return (u_agent.isEmpty()); }
virtual const char* type() { return "User-Agent"; }
protected:
- QCString u_agent;
+ TQCString u_agent;
};
@@ -808,7 +808,7 @@ typedef Headers::Base* (*headerCreator)(void);
@see KMime::Headers::Base KMime::Headers::Generic
*/
-class HeaderFactory : public QAsciiDict<headerCreator>
+class HeaderFactory : public TQAsciiDict<headerCreator>
{
private:
HeaderFactory();
@@ -834,7 +834,7 @@ public:
convenience. It differs from the above only in what arguments it
takes.
*/
- static Headers::Base* create( const QCString& aType )
+ static Headers::Base* create( const TQCString& aType )
{
return create( aType.data() );
}
diff --git a/libkmime/kmime_headers_obs.h b/libkmime/kmime_headers_obs.h
index 41be1692a..3455c00a9 100644
--- a/libkmime/kmime_headers_obs.h
+++ b/libkmime/kmime_headers_obs.h
@@ -28,22 +28,22 @@ class KDE_EXPORT MessageID : public Base {
public:
MessageID() : Base() {}
MessageID(Content *p) : Base(p) {}
- MessageID(Content *p, const QCString &s) : Base(p) { from7BitString(s); }
- MessageID(Content *p, const QString &s) : Base(p) { fromUnicodeString(s, Latin1); }
+ MessageID(Content *p, const TQCString &s) : Base(p) { from7BitString(s); }
+ MessageID(Content *p, const TQString &s) : Base(p) { fromUnicodeString(s, Latin1); }
~MessageID() {}
- virtual void from7BitString(const QCString &s);
- virtual QCString as7BitString(bool incType=true);
- virtual void fromUnicodeString(const QString &s, const QCString&);
- virtual QString asUnicodeString();
+ virtual void from7BitString(const TQCString &s);
+ virtual TQCString as7BitString(bool incType=true);
+ virtual void fromUnicodeString(const TQString &s, const TQCString&);
+ virtual TQString asUnicodeString();
virtual void clear() { m_id.resize(0); }
virtual bool isEmpty() { return (m_id.isEmpty()); }
virtual const char* type() { return "Message-Id"; }
- void generate(const QCString &fqdn);
+ void generate(const TQCString &fqdn);
protected:
- QCString m_id;
+ TQCString m_id;
};
@@ -53,8 +53,8 @@ class KDE_EXPORT Supersedes : public MessageID {
public:
Supersedes() : MessageID() {}
Supersedes(Content *p) : MessageID(p) {}
- Supersedes(Content *p, const QCString &s) : MessageID(p,s) {}
- Supersedes(Content *p, const QString &s) : MessageID(p,s) {}
+ Supersedes(Content *p, const TQCString &s) : MessageID(p,s) {}
+ Supersedes(Content *p, const TQString &s) : MessageID(p,s) {}
~Supersedes() {}
virtual const char* type() { return "Supersedes"; }
@@ -68,34 +68,34 @@ class KDE_EXPORT AddressField : public Base {
public:
AddressField() : Base() {}
AddressField(Content *p) : Base(p) {}
- AddressField(Content *p, const QCString &s) : Base(p) { from7BitString(s); }
- AddressField(Content *p, const QString &s, const QCString &cs) : Base(p) { fromUnicodeString(s, cs); }
+ AddressField(Content *p, const TQCString &s) : Base(p) { from7BitString(s); }
+ AddressField(Content *p, const TQString &s, const TQCString &cs) : Base(p) { fromUnicodeString(s, cs); }
AddressField(const AddressField &a): Base(a.p_arent) { n_ame=a.n_ame; e_mail=a.e_mail.copy(); e_ncCS=a.e_ncCS; }
~AddressField() {}
AddressField& operator=(const AddressField &a) { n_ame=a.n_ame; e_mail=a.e_mail.copy(); e_ncCS=a.e_ncCS; return (*this); }
- virtual void from7BitString(const QCString &s);
- virtual QCString as7BitString(bool incType=true);
- virtual void fromUnicodeString(const QString &s, const QCString &cs);
- virtual QString asUnicodeString();
+ virtual void from7BitString(const TQCString &s);
+ virtual TQCString as7BitString(bool incType=true);
+ virtual void fromUnicodeString(const TQString &s, const TQCString &cs);
+ virtual TQString asUnicodeString();
virtual void clear() { n_ame.truncate(0); e_mail.resize(0); }
virtual bool isEmpty() { return (e_mail.isEmpty() && n_ame.isEmpty()); }
bool hasName() { return ( !n_ame.isEmpty() ); }
bool hasEmail() { return ( !e_mail.isEmpty() ); }
- QString name() { return n_ame; }
- QCString nameAs7Bit();
- QCString email() { return e_mail; }
- void setName(const QString &s) { n_ame=s; }
- void setNameFrom7Bit(const QCString &s);
- void setEmail(const QCString &s) { e_mail=s; }
+ TQString name() { return n_ame; }
+ TQCString nameAs7Bit();
+ TQCString email() { return e_mail; }
+ void setName(const TQString &s) { n_ame=s; }
+ void setNameFrom7Bit(const TQCString &s);
+ void setEmail(const TQCString &s) { e_mail=s; }
protected:
- QString n_ame;
- QCString e_mail;
+ TQString n_ame;
+ TQCString e_mail;
};
-typedef QPtrList<AddressField> ObsAddressList;
+typedef TQPtrList<AddressField> ObsAddressList;
/** Represent a "From" header */
class KDE_EXPORT From : public AddressField {
@@ -103,8 +103,8 @@ class KDE_EXPORT From : public AddressField {
public:
From() : AddressField() {}
From(Content *p) : AddressField(p) {}
- From(Content *p, const QCString &s) : AddressField(p,s) {}
- From(Content *p, const QString &s, const QCString &cs) : AddressField(p,s,cs) {}
+ From(Content *p, const TQCString &s) : AddressField(p,s) {}
+ From(Content *p, const TQString &s, const TQCString &cs) : AddressField(p,s,cs) {}
~From() {}
virtual const char* type() { return "From"; }
@@ -117,8 +117,8 @@ class KDE_EXPORT ReplyTo : public AddressField {
public:
ReplyTo() : AddressField() {}
ReplyTo(Content *p) : AddressField(p) {}
- ReplyTo(Content *p, const QCString &s) : AddressField(p,s) {}
- ReplyTo(Content *p, const QString &s, const QCString &cs) : AddressField(p,s,cs) {}
+ ReplyTo(Content *p, const TQCString &s) : AddressField(p,s) {}
+ ReplyTo(Content *p, const TQString &s, const TQCString &cs) : AddressField(p,s,cs) {}
~ReplyTo() {}
virtual const char* type() { return "Reply-To"; }
@@ -133,8 +133,8 @@ class KDE_EXPORT MailCopiesTo : public AddressField {
public:
MailCopiesTo() : AddressField() {}
MailCopiesTo(Content *p) : AddressField(p) {}
- MailCopiesTo(Content *p, const QCString &s) : AddressField(p,s) {}
- MailCopiesTo(Content *p, const QString &s, const QCString &cs) : AddressField(p,s,cs) {}
+ MailCopiesTo(Content *p, const TQCString &s) : AddressField(p,s) {}
+ MailCopiesTo(Content *p, const TQString &s, const TQCString &cs) : AddressField(p,s,cs) {}
~MailCopiesTo() {}
bool isValid();
@@ -151,23 +151,23 @@ class KDE_EXPORT To : public Base {
public:
To() : Base(),a_ddrList(0) {}
To(Content *p) : Base(p),a_ddrList(0) {}
- To(Content *p, const QCString &s) : Base(p),a_ddrList(0) { from7BitString(s); }
- To(Content *p, const QString &s, const QCString &cs) : Base(p),a_ddrList(0) { fromUnicodeString(s,cs); }
+ To(Content *p, const TQCString &s) : Base(p),a_ddrList(0) { from7BitString(s); }
+ To(Content *p, const TQString &s, const TQCString &cs) : Base(p),a_ddrList(0) { fromUnicodeString(s,cs); }
~To() { delete a_ddrList; }
- virtual void from7BitString(const QCString &s);
- virtual QCString as7BitString(bool incType=true);
- virtual void fromUnicodeString(const QString &s, const QCString &cs);
- virtual QString asUnicodeString();
+ virtual void from7BitString(const TQCString &s);
+ virtual TQCString as7BitString(bool incType=true);
+ virtual void fromUnicodeString(const TQString &s, const TQCString &cs);
+ virtual TQString asUnicodeString();
virtual void clear() { delete a_ddrList; a_ddrList=0; }
virtual bool isEmpty() { return (!a_ddrList || a_ddrList->isEmpty()
|| a_ddrList->first()->isEmpty()); }
virtual const char* type() { return "To"; }
void addAddress(const AddressField &a);
- void emails(QStrList *l);
- void names(QStringList *l);
- void displayNames(QStringList *l);
+ void emails(TQStrList *l);
+ void names(TQStringList *l);
+ void displayNames(TQStringList *l);
protected:
ObsAddressList *a_ddrList;
@@ -181,8 +181,8 @@ class KDE_EXPORT CC : public To {
public:
CC() : To() {}
CC(Content *p) : To(p) {}
- CC(Content *p, const QCString &s) : To(p,s) {}
- CC(Content *p, const QString &s, const QCString &cs) : To(p,s,cs) {}
+ CC(Content *p, const TQCString &s) : To(p,s) {}
+ CC(Content *p, const TQString &s, const TQCString &cs) : To(p,s,cs) {}
~CC() {}
virtual const char* type() { return "CC"; }
@@ -196,8 +196,8 @@ class KDE_EXPORT BCC : public To {
public:
BCC() : To() {}
BCC(Content *p) : To(p) {}
- BCC(Content *p, const QCString &s) : To(p,s) {}
- BCC(Content *p, const QString &s, const QCString &cs) : To(p,s,cs) {}
+ BCC(Content *p, const TQCString &s) : To(p,s) {}
+ BCC(Content *p, const TQString &s, const TQCString &cs) : To(p,s,cs) {}
~BCC() {}
virtual const char* type() { return "BCC"; }
@@ -210,26 +210,26 @@ class KDE_EXPORT References : public Base {
public:
References() : Base(),p_os(-1) {}
References(Content *p) : Base(p),p_os(-1) {}
- References(Content *p, const QCString &s) : Base(p),p_os(-1) { from7BitString(s); }
- References(Content *p, const QString &s) : Base(p),p_os(-1) { fromUnicodeString(s, Latin1); }
+ References(Content *p, const TQCString &s) : Base(p),p_os(-1) { from7BitString(s); }
+ References(Content *p, const TQString &s) : Base(p),p_os(-1) { fromUnicodeString(s, Latin1); }
~References() {}
- virtual void from7BitString(const QCString &s);
- virtual QCString as7BitString(bool incType=true);
- virtual void fromUnicodeString(const QString &s, const QCString&);
- virtual QString asUnicodeString();
+ virtual void from7BitString(const TQCString &s);
+ virtual TQCString as7BitString(bool incType=true);
+ virtual void fromUnicodeString(const TQString &s, const TQCString&);
+ virtual TQString asUnicodeString();
virtual void clear() { r_ef.resize(0); p_os=0; }
virtual bool isEmpty() { return (r_ef.isEmpty()); }
virtual const char* type() { return "References"; }
int count();
- QCString first();
- QCString next();
- QCString at(unsigned int i);
- void append(const QCString &s);
+ TQCString first();
+ TQCString next();
+ TQCString at(unsigned int i);
+ void append(const TQCString &s);
protected:
- QCString r_ef;
+ TQCString r_ef;
int p_os;
};
@@ -240,24 +240,24 @@ class KDE_EXPORT ContentType : public Base {
public:
ContentType() : Base(),m_imeType("invalid/invalid"),c_ategory(CCsingle) {}
ContentType(Content *p) : Base(p),m_imeType("invalid/invalid"),c_ategory(CCsingle) {}
- ContentType(Content *p, const QCString &s) : Base(p) { from7BitString(s); }
- ContentType(Content *p, const QString &s) : Base(p) { fromUnicodeString(s, Latin1); }
+ ContentType(Content *p, const TQCString &s) : Base(p) { from7BitString(s); }
+ ContentType(Content *p, const TQString &s) : Base(p) { fromUnicodeString(s, Latin1); }
~ContentType() {}
- virtual void from7BitString(const QCString &s);
- virtual QCString as7BitString(bool incType=true);
- virtual void fromUnicodeString(const QString &s, const QCString&);
- virtual QString asUnicodeString();
+ virtual void from7BitString(const TQCString &s);
+ virtual TQCString as7BitString(bool incType=true);
+ virtual void fromUnicodeString(const TQString &s, const TQCString&);
+ virtual TQString asUnicodeString();
virtual void clear() { m_imeType.resize(0); p_arams.resize(0); }
virtual bool isEmpty() { return (m_imeType.isEmpty()); }
virtual const char* type() { return "Content-Type"; }
//mime-type handling
- QCString mimeType() { return m_imeType; }
- QCString mediaType();
- QCString subType();
- void setMimeType(const QCString &s);
+ TQCString mimeType() { return m_imeType; }
+ TQCString mediaType();
+ TQCString subType();
+ void setMimeType(const TQCString &s);
bool isMediatype(const char *s);
bool isSubtype(const char *s);
bool isText();
@@ -268,14 +268,14 @@ class KDE_EXPORT ContentType : public Base {
bool isPartial();
//parameter handling
- QCString charset();
- void setCharset(const QCString &s);
- QCString boundary();
- void setBoundary(const QCString &s);
- QString name();
- void setName(const QString &s, const QCString &cs);
- QCString id();
- void setId(const QCString &s);
+ TQCString charset();
+ void setCharset(const TQCString &s);
+ TQCString boundary();
+ void setBoundary(const TQCString &s);
+ TQString name();
+ void setName(const TQString &s, const TQCString &cs);
+ TQCString id();
+ void setId(const TQCString &s);
int partialNumber();
int partialCount();
void setPartialParams(int total, int number);
@@ -285,9 +285,9 @@ class KDE_EXPORT ContentType : public Base {
void setCategory(contentCategory c) { c_ategory=c; }
protected:
- QCString getParameter(const char *name);
- void setParameter(const QCString &name, const QCString &value, bool doubleQuotes=false);
- QCString m_imeType, p_arams;
+ TQCString getParameter(const char *name);
+ void setParameter(const TQCString &name, const TQCString &value, bool doubleQuotes=false);
+ TQCString m_imeType, p_arams;
contentCategory c_ategory;
};
@@ -299,14 +299,14 @@ class KDE_EXPORT CTEncoding : public Base {
public:
CTEncoding() : Base(),c_te(CE7Bit),d_ecoded(true) {}
CTEncoding(Content *p) : Base(p),c_te(CE7Bit),d_ecoded(true) {}
- CTEncoding(Content *p, const QCString &s) : Base(p) { from7BitString(s); }
- CTEncoding(Content *p, const QString &s) : Base(p) { fromUnicodeString(s, Latin1); }
+ CTEncoding(Content *p, const TQCString &s) : Base(p) { from7BitString(s); }
+ CTEncoding(Content *p, const TQString &s) : Base(p) { fromUnicodeString(s, Latin1); }
~CTEncoding() {}
- virtual void from7BitString(const QCString &s);
- virtual QCString as7BitString(bool incType=true);
- virtual void fromUnicodeString(const QString &s, const QCString&);
- virtual QString asUnicodeString();
+ virtual void from7BitString(const TQCString &s);
+ virtual TQCString as7BitString(bool incType=true);
+ virtual void fromUnicodeString(const TQString &s, const TQCString&);
+ virtual TQString asUnicodeString();
virtual void clear() { d_ecoded=true; c_te=CE7Bit; }
virtual const char* type() { return "Content-Transfer-Encoding"; }
@@ -329,14 +329,14 @@ class KDE_EXPORT CDisposition : public Base {
public:
CDisposition() : Base(),d_isp(CDinline) {}
CDisposition(Content *p) : Base(p),d_isp(CDinline) {}
- CDisposition(Content *p, const QCString &s) : Base(p) { from7BitString(s); }
- CDisposition(Content *p, const QString &s, const QCString &cs) : Base(p) { fromUnicodeString(s, cs); }
+ CDisposition(Content *p, const TQCString &s) : Base(p) { from7BitString(s); }
+ CDisposition(Content *p, const TQString &s, const TQCString &cs) : Base(p) { fromUnicodeString(s, cs); }
~CDisposition() {}
- virtual void from7BitString(const QCString &s);
- virtual QCString as7BitString(bool incType=true);
- virtual void fromUnicodeString(const QString &s, const QCString &cs);
- virtual QString asUnicodeString();
+ virtual void from7BitString(const TQCString &s);
+ virtual TQCString as7BitString(bool incType=true);
+ virtual void fromUnicodeString(const TQString &s, const TQCString &cs);
+ virtual TQString asUnicodeString();
virtual void clear() { f_ilename.truncate(0); d_isp=CDinline; }
virtual const char* type() { return "Content-Disposition"; }
@@ -344,12 +344,12 @@ class KDE_EXPORT CDisposition : public Base {
void setDisposition(contentDisposition d) { d_isp=d; }
bool isAttachment() { return (d_isp==CDattachment); }
- QString filename() { return f_ilename; }
- void setFilename(const QString &s) { f_ilename=s; }
+ TQString filename() { return f_ilename; }
+ void setFilename(const TQString &s) { f_ilename=s; }
protected:
contentDisposition d_isp;
- QString f_ilename;
+ TQString f_ilename;
};
@@ -360,9 +360,9 @@ class KDE_EXPORT CDescription : public Generics::GUnstructured {
public:
CDescription() : Generics::GUnstructured() {}
CDescription( Content * p ) : Generics::GUnstructured( p ) {}
- CDescription( Content * p, const QCString & s )
+ CDescription( Content * p, const TQCString & s )
: Generics::GUnstructured( p, s ) {};
- CDescription( Content * p, const QString & s, const QCString & cs )
+ CDescription( Content * p, const TQString & s, const TQCString & cs )
: Generics::GUnstructured( p, s, cs ) {}
~CDescription() {}
diff --git a/libkmime/kmime_mdn.cpp b/libkmime/kmime_mdn.cpp
index 678589d65..75f1a91e9 100644
--- a/libkmime/kmime_mdn.cpp
+++ b/libkmime/kmime_mdn.cpp
@@ -37,7 +37,7 @@
#include <klocale.h>
#include <kdebug.h>
-#include <qcstring.h>
+#include <tqcstring.h>
#include <unistd.h> // gethostname
@@ -156,11 +156,11 @@ namespace MDN {
return 0;
}
- static QCString dispositionField( DispositionType d, ActionMode a, SendingMode s,
- const QValueList<DispositionModifier> & m ) {
+ static TQCString dispositionField( DispositionType d, ActionMode a, SendingMode s,
+ const TQValueList<DispositionModifier> & m ) {
// mandatory parts: Disposition: foo/baz; bar
- QCString result = "Disposition: ";
+ TQCString result = "Disposition: ";
result += stringFor( a );
result += "/";
result += stringFor( s );
@@ -169,7 +169,7 @@ namespace MDN {
// optional parts: Disposition: foo/baz; bar/mod1,mod2,mod3
bool first = true;
- for ( QValueList<DispositionModifier>::const_iterator mt = m.begin() ;
+ for ( TQValueList<DispositionModifier>::const_iterator mt = m.begin() ;
mt != m.end() ; ++mt ) {
if ( first ) {
result += "/";
@@ -182,56 +182,56 @@ namespace MDN {
return result + "\n";
}
- static QCString finalRecipient( const QString & recipient ) {
+ static TQCString finalRecipient( const TQString & recipient ) {
if ( recipient.isEmpty() )
- return QCString();
+ return TQCString();
else
return "Final-Recipient: rfc822; "
+ encodeRFC2047String( recipient, "utf-8" ) + "\n";
}
- static QCString orginalRecipient( const QCString & recipient ) {
+ static TQCString orginalRecipient( const TQCString & recipient ) {
if ( recipient.isEmpty() )
- return QCString();
+ return TQCString();
else
return "Original-Recipient: " + recipient + "\n";
}
- static QCString originalMessageID( const QCString & msgid ) {
+ static TQCString originalMessageID( const TQCString & msgid ) {
if ( msgid.isEmpty() )
- return QCString();
+ return TQCString();
else
return "Original-Message-ID: " + msgid + "\n";
}
- static QCString reportingUAField() {
+ static TQCString reportingUAField() {
char hostName[256];
if ( gethostname( hostName, 255 ) )
hostName[0] = '\0'; // gethostname failed: pretend empty string
else
hostName[255] = '\0'; // gethostname may have returned 255 chars (man page)
- return QCString("Reporting-UA: ") + hostName
+ return TQCString("Reporting-UA: ") + hostName
+ "; KMime " KMIME_VERSION_STRING "\n";
}
- QCString dispositionNotificationBodyContent( const QString & r,
- const QCString & o,
- const QCString & omid,
+ TQCString dispositionNotificationBodyContent( const TQString & r,
+ const TQCString & o,
+ const TQCString & omid,
DispositionType d,
ActionMode a,
SendingMode s,
- const QValueList<DispositionModifier> & m,
- const QString & special )
+ const TQValueList<DispositionModifier> & m,
+ const TQString & special )
{
// in Perl: chomp(special)
- QString spec;
+ TQString spec;
if ( special.endsWith("\n") )
spec = special.left( special.length() - 1 );
else
spec = special;
// std headers:
- QCString result = reportingUAField();
+ TQCString result = reportingUAField();
result += orginalRecipient( o );
result += finalRecipient( r );
result += originalMessageID( omid );
@@ -248,14 +248,14 @@ namespace MDN {
return result;
}
- QString descriptionFor( DispositionType d,
- const QValueList<DispositionModifier> & ) {
+ TQString descriptionFor( DispositionType d,
+ const TQValueList<DispositionModifier> & ) {
for ( int i = 0 ; i < numDispositionTypes ; ++i )
if ( dispositionTypes[i].dispositionType == d )
return i18n( dispositionTypes[i].description );
kdWarning() << "KMime::MDN::descriptionFor(): No such disposition type: "
<< (int)d << endl;
- return QString::null;
+ return TQString::null;
}
} // namespace MDN
diff --git a/libkmime/kmime_mdn.h b/libkmime/kmime_mdn.h
index 2fd76e6d7..1149619fd 100644
--- a/libkmime/kmime_mdn.h
+++ b/libkmime/kmime_mdn.h
@@ -32,8 +32,8 @@
#ifndef __KMIME_MDN_H__
#define __KMIME_MDN_H__
-#include <qvaluelist.h>
-#include <qstring.h>
+#include <tqvaluelist.h>
+#include <tqstring.h>
#include <kdepimmacros.h>
@@ -178,19 +178,19 @@ namespace KMime {
/** Main function. Generates the content of the
message/disposition-notification body part. */
- KDE_EXPORT extern QCString dispositionNotificationBodyContent( const QString & finalRecipient,
- const QCString & originalRecipient,
- const QCString & originalMsgID,
+ KDE_EXPORT extern TQCString dispositionNotificationBodyContent( const TQString & finalRecipient,
+ const TQCString & originalRecipient,
+ const TQCString & originalMsgID,
DispositionType disposition,
ActionMode actionMode,
SendingMode sendingMode,
- const QValueList<DispositionModifier> & dispositionModifers
- =QValueList<DispositionModifier>(),
- const QString & special=QString::null );
+ const TQValueList<DispositionModifier> & dispositionModifers
+ =TQValueList<DispositionModifier>(),
+ const TQString & special=TQString::null );
- KDE_EXPORT extern QString descriptionFor( DispositionType d,
- const QValueList<DispositionModifier> & m
- =QValueList<DispositionModifier>() );
+ KDE_EXPORT extern TQString descriptionFor( DispositionType d,
+ const TQValueList<DispositionModifier> & m
+ =TQValueList<DispositionModifier>() );
enum ReturnContent { Nothing, All, HeadersOnly };
diff --git a/libkmime/kmime_message.cpp b/libkmime/kmime_message.cpp
index 2bfbf91a6..0d516ecc7 100644
--- a/libkmime/kmime_message.cpp
+++ b/libkmime/kmime_message.cpp
@@ -32,7 +32,7 @@ void Message::parse()
{
Content::parse();
- QCString raw;
+ TQCString raw;
if( !(raw=rawHeader(s_ubject.type())).isEmpty() )
s_ubject.from7BitString(raw);
@@ -44,7 +44,7 @@ void Message::parse()
void Message::assemble()
{
Headers::Base *h;
- QCString newHead="";
+ TQCString newHead="";
//Message-ID
if( (h=messageID(false))!=0 )
diff --git a/libkmime/kmime_message.h b/libkmime/kmime_message.h
index 1209d420e..8f6a0a398 100644
--- a/libkmime/kmime_message.h
+++ b/libkmime/kmime_message.h
@@ -25,7 +25,7 @@ namespace KMime {
class KDE_EXPORT Message : public Content {
public:
- typedef QPtrList<Message> List;
+ typedef TQPtrList<Message> List;
/** Constructor. Creates an empty message. */
Message();
diff --git a/libkmime/kmime_newsarticle.cpp b/libkmime/kmime_newsarticle.cpp
index a60b07df8..1b16ad71f 100644
--- a/libkmime/kmime_newsarticle.cpp
+++ b/libkmime/kmime_newsarticle.cpp
@@ -23,7 +23,7 @@ void NewsArticle::parse()
{
Message::parse();
- QCString raw;
+ TQCString raw;
if( !(raw=rawHeader(l_ines.type())).isEmpty() )
l_ines.from7BitString(raw);
@@ -32,7 +32,7 @@ void NewsArticle::parse()
void NewsArticle::assemble()
{
Headers::Base *h;
- QCString newHead="";
+ TQCString newHead="";
//Message-ID
if( (h=messageID(false))!=0 )
diff --git a/libkmime/kmime_parsers.cpp b/libkmime/kmime_parsers.cpp
index 181ce6772..6527c9912 100644
--- a/libkmime/kmime_parsers.cpp
+++ b/libkmime/kmime_parsers.cpp
@@ -15,7 +15,7 @@
*/
#include "kmime_parsers.h"
-#include <qregexp.h>
+#include <tqregexp.h>
using namespace KMime::Parser;
@@ -23,7 +23,7 @@ namespace KMime {
namespace Parser {
-MultiPart::MultiPart(const QCString &src, const QCString &boundary)
+MultiPart::MultiPart(const TQCString &src, const TQCString &boundary)
{
s_rc=src;
b_oundary=boundary;
@@ -32,7 +32,7 @@ MultiPart::MultiPart(const QCString &src, const QCString &boundary)
bool MultiPart::parse()
{
- QCString b="--"+b_oundary, part;
+ TQCString b="--"+b_oundary, part;
int pos1=0, pos2=0, blen=b.length();
p_arts.clear();
@@ -95,16 +95,16 @@ bool MultiPart::parse()
//============================================================================================
-NonMimeParser::NonMimeParser(const QCString &src) :
+NonMimeParser::NonMimeParser(const TQCString &src) :
s_rc(src), p_artNr(-1), t_otalNr(-1)
{}
/**
* try to guess the mimetype from the file-extension
*/
-QCString NonMimeParser::guessMimeType(const QCString& fileName)
+TQCString NonMimeParser::guessMimeType(const TQCString& fileName)
{
- QCString tmp, mimeType;
+ TQCString tmp, mimeType;
int pos;
if(!fileName.isEmpty()) {
@@ -137,7 +137,7 @@ QCString NonMimeParser::guessMimeType(const QCString& fileName)
//============================================================================================
-UUEncoded::UUEncoded(const QCString &src, const QCString &subject) :
+UUEncoded::UUEncoded(const TQCString &src, const TQCString &subject) :
NonMimeParser(src), s_ubject(subject)
{}
@@ -150,9 +150,9 @@ bool UUEncoded::parse()
while (success) {
int beginPos=currentPos, uuStart=currentPos, endPos=0, lineCount=0, MCount=0, pos=0, len=0;
bool containsBegin=false, containsEnd=false;
- QCString tmp,fileName;
+ TQCString tmp,fileName;
- if( (beginPos=s_rc.find(QRegExp("begin [0-9][0-9][0-9]"),currentPos))>-1 && (beginPos==0 || s_rc.at(beginPos-1)=='\n') ) {
+ if( (beginPos=s_rc.find(TQRegExp("begin [0-9][0-9][0-9]"),currentPos))>-1 && (beginPos==0 || s_rc.at(beginPos-1)=='\n') ) {
containsBegin=true;
uuStart=s_rc.find('\n', beginPos);
if(uuStart==-1) {//no more line breaks found, we give up
@@ -189,8 +189,8 @@ bool UUEncoded::parse()
}
if( (!containsBegin || !containsEnd) && s_ubject) { // message may be split up => parse subject
- QRegExp rx("[0-9]+/[0-9]+");
- pos=rx.search(QString(s_ubject), 0);
+ TQRegExp rx("[0-9]+/[0-9]+");
+ pos=rx.search(TQString(s_ubject), 0);
len=rx.matchedLength();
if(pos!=-1) {
tmp=s_ubject.mid(pos, len);
@@ -239,15 +239,15 @@ bool UUEncoded::parse()
//============================================================================================
-YENCEncoded::YENCEncoded(const QCString &src) :
+YENCEncoded::YENCEncoded(const TQCString &src) :
NonMimeParser(src)
{}
-bool YENCEncoded::yencMeta(QCString& src, const QCString& name, int* value)
+bool YENCEncoded::yencMeta(TQCString& src, const TQCString& name, int* value)
{
bool found = false;
- QCString sought=name + "=";
+ TQCString sought=name + "=";
int iPos=src.find( sought);
if (iPos>-1) {
@@ -282,7 +282,7 @@ bool YENCEncoded::parse()
while (success) {
int beginPos=currentPos, yencStart=currentPos;
bool containsPart=false;
- QCString fileName,mimeType;
+ TQCString fileName,mimeType;
if ((beginPos=s_rc.find("=ybegin ", currentPos))>-1 && ( beginPos==0 || s_rc.at( beginPos-1)=='\n') ) {
yencStart=s_rc.find( '\n', beginPos);
@@ -304,7 +304,7 @@ bool YENCEncoded::parse()
// Try to identify yenc meta data
// Filenames can contain any embedded chars until end of line
- QCString meta=s_rc.mid(beginPos, yencStart-beginPos);
+ TQCString meta=s_rc.mid(beginPos, yencStart-beginPos);
int namePos=meta.find("name=");
if (namePos== -1) {
success=false;
@@ -356,7 +356,7 @@ bool YENCEncoded::parse()
bool lineStart=true;
int lineLength=0;
bool containsEnd=false;
- QByteArray binary = QByteArray(yencSize);
+ TQByteArray binary = TQByteArray(yencSize);
while (pos<len) {
int ch=s_rc.at(pos);
if (ch<0)
diff --git a/libkmime/kmime_parsers.h b/libkmime/kmime_parsers.h
index 752bed804..b16b0b6a7 100644
--- a/libkmime/kmime_parsers.h
+++ b/libkmime/kmime_parsers.h
@@ -16,9 +16,9 @@
#ifndef __KMIME_PARSERS__
#define __KMIME_PARSERS__
-#include <qvaluelist.h>
-#include <qcstring.h>
-#include <qstrlist.h>
+#include <tqvaluelist.h>
+#include <tqcstring.h>
+#include <tqstrlist.h>
namespace KMime {
@@ -31,17 +31,17 @@ namespace Parser {
class MultiPart {
public:
- MultiPart(const QCString &src, const QCString &boundary);
+ MultiPart(const TQCString &src, const TQCString &boundary);
~MultiPart() {};
bool parse();
- QValueList<QCString> parts() { return p_arts; }
- QCString preamble() { return p_reamble; }
- QCString epilouge() { return e_pilouge; }
+ TQValueList<TQCString> parts() { return p_arts; }
+ TQCString preamble() { return p_reamble; }
+ TQCString epilouge() { return e_pilouge; }
protected:
- QCString s_rc, b_oundary, p_reamble, e_pilouge;
- QValueList<QCString> p_arts;
+ TQCString s_rc, b_oundary, p_reamble, e_pilouge;
+ TQValueList<TQCString> p_arts;
};
@@ -52,23 +52,23 @@ protected:
class NonMimeParser {
public:
- NonMimeParser(const QCString &src);
+ NonMimeParser(const TQCString &src);
virtual ~NonMimeParser() {};
virtual bool parse() = 0;
bool isPartial() { return (p_artNr>-1 && t_otalNr>-1 && t_otalNr!=1); }
int partialNumber() { return p_artNr; }
int partialCount() { return t_otalNr; }
bool hasTextPart() { return (t_ext.length()>1); }
- QCString textPart() { return t_ext; }
- QStrList binaryParts() { return b_ins; }
- QStrList filenames() { return f_ilenames; }
- QStrList mimeTypes() { return m_imeTypes; }
+ TQCString textPart() { return t_ext; }
+ TQStrList binaryParts() { return b_ins; }
+ TQStrList filenames() { return f_ilenames; }
+ TQStrList mimeTypes() { return m_imeTypes; }
protected:
- static QCString guessMimeType(const QCString& fileName);
+ static TQCString guessMimeType(const TQCString& fileName);
- QCString s_rc, t_ext;
- QStrList b_ins, f_ilenames, m_imeTypes;
+ TQCString s_rc, t_ext;
+ TQStrList b_ins, f_ilenames, m_imeTypes;
int p_artNr, t_otalNr;
};
@@ -80,12 +80,12 @@ protected:
class UUEncoded : public NonMimeParser {
public:
- UUEncoded(const QCString &src, const QCString &subject);
+ UUEncoded(const TQCString &src, const TQCString &subject);
virtual bool parse();
protected:
- QCString s_ubject;
+ TQCString s_ubject;
};
@@ -97,14 +97,14 @@ protected:
class YENCEncoded : public NonMimeParser {
public:
- YENCEncoded(const QCString &src);
+ YENCEncoded(const TQCString &src);
virtual bool parse();
- QValueList<QByteArray> binaryParts() { return b_ins; }
+ TQValueList<TQByteArray> binaryParts() { return b_ins; }
protected:
- QValueList<QByteArray> b_ins;
- static bool yencMeta( QCString& src, const QCString& name, int* value);
+ TQValueList<TQByteArray> b_ins;
+ static bool yencMeta( TQCString& src, const TQCString& name, int* value);
};
diff --git a/libkmime/kmime_util.cpp b/libkmime/kmime_util.cpp
index 8923a5b0a..313aabe72 100644
--- a/libkmime/kmime_util.cpp
+++ b/libkmime/kmime_util.cpp
@@ -29,9 +29,9 @@
#include <kcalendarsystem.h>
#endif
-#include <qtextcodec.h>
-#include <qstrlist.h> // for QStrIList
-#include <qregexp.h>
+#include <tqtextcodec.h>
+#include <tqstrlist.h> // for QStrIList
+#include <tqregexp.h>
#include <stdlib.h>
#include <ctype.h>
@@ -42,10 +42,10 @@ using namespace KMime;
namespace KMime {
-QStrIList c_harsetCache;
-QStrIList l_anguageCache;
+TQStrIList c_harsetCache;
+TQStrIList l_anguageCache;
-const char* cachedCharset(const QCString &name)
+const char* cachedCharset(const TQCString &name)
{
int idx=c_harsetCache.find(name.data());
if(idx>-1)
@@ -56,7 +56,7 @@ const char* cachedCharset(const QCString &name)
return c_harsetCache.last();
}
-const char* cachedLanguage(const QCString &name)
+const char* cachedLanguage(const TQCString &name)
{
int idx=l_anguageCache.find(name.data());
if(idx>-1)
@@ -67,7 +67,7 @@ const char* cachedLanguage(const QCString &name)
return l_anguageCache.last();
}
-bool isUsAscii(const QString &s)
+bool isUsAscii(const TQString &s)
{
uint sLength = s.length();
for (uint i=0; i<sLength; i++)
@@ -121,11 +121,11 @@ const uchar eTextMap[16] = {
#undef truncate
#endif
-QString decodeRFC2047String(const QCString &src, const char **usedCS,
- const QCString &defaultCS, bool forceCS)
+TQString decodeRFC2047String(const TQCString &src, const char **usedCS,
+ const TQCString &defaultCS, bool forceCS)
{
- QCString result, str;
- QCString declaredCS;
+ TQCString result, str;
+ TQCString declaredCS;
char *pos, *dest, *beg, *end, *mid, *endOfLastEncWord=0;
char encoding = '\0';
bool valid, onlySpacesSinceLastWord=false;
@@ -183,7 +183,7 @@ QString decodeRFC2047String(const QCString &src, const char **usedCS,
dest=endOfLastEncWord;
if (mid < pos) {
- str = QCString(mid, (int)(pos - mid + 1));
+ str = TQCString(mid, (int)(pos - mid + 1));
if (encoding == 'Q')
{
// decode quoted printable text
@@ -218,7 +218,7 @@ QString decodeRFC2047String(const QCString &src, const char **usedCS,
}
//find suitable QTextCodec
- QTextCodec *codec=0;
+ TQTextCodec *codec=0;
bool ok=true;
if (forceCS || declaredCS.isEmpty()) {
codec=KGlobal::charsets()->codecForName(defaultCS);
@@ -237,19 +237,19 @@ QString decodeRFC2047String(const QCString &src, const char **usedCS,
return codec->toUnicode(result.data(), result.length());
}
-QString decodeRFC2047String(const QCString &src)
+TQString decodeRFC2047String(const TQCString &src)
{
const char *usedCS;
return decodeRFC2047String(src, &usedCS, "utf-8", false);
}
-QCString encodeRFC2047String(const QString &src, const char *charset,
+TQCString encodeRFC2047String(const TQString &src, const char *charset,
bool addressHeader, bool allow8BitHeaders)
{
- QCString encoded8Bit, result, usedCS;
+ TQCString encoded8Bit, result, usedCS;
unsigned int start=0,end=0;
bool nonAscii=false, ok=true, useQEncoding=false;
- QTextCodec *codec=0;
+ TQTextCodec *codec=0;
usedCS=charset;
codec=KGlobal::charsets()->codecForName(usedCS, ok);
@@ -333,11 +333,11 @@ QCString encodeRFC2047String(const QString &src, const char *charset,
return result;
}
-QCString uniqueString()
+TQCString uniqueString()
{
static char chars[] = "0123456789abcdefghijklmnopqrstuvxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
time_t now;
- QCString ret;
+ TQCString ret;
char p[11];
int pos, ran;
unsigned int timeval;
@@ -358,16 +358,16 @@ QCString uniqueString()
}
-QCString multiPartBoundary()
+TQCString multiPartBoundary()
{
- QCString ret;
+ TQCString ret;
ret="nextPart"+uniqueString();
return ret;
}
-QCString extractHeader(const QCString &src, const char *name)
+TQCString extractHeader(const TQCString &src, const char *name)
{
- QCString n=QCString(name)+":";
+ TQCString n=TQCString(name)+":";
int pos1=-1, pos2=0, len=src.length()-1;
bool folded(false);
@@ -400,39 +400,39 @@ QCString extractHeader(const QCString &src, const char *name)
if (!folded)
return src.mid(pos1, pos2-pos1);
else
- return (src.mid(pos1, pos2-pos1).replace(QRegExp("\\s*\\n\\s*")," "));
+ return (src.mid(pos1, pos2-pos1).replace(TQRegExp("\\s*\\n\\s*")," "));
}
else {
- return QCString(0); //header not found
+ return TQCString(0); //header not found
}
}
-QCString CRLFtoLF(const QCString &s)
+TQCString CRLFtoLF(const TQCString &s)
{
- QCString ret=s.copy();
- ret.replace(QRegExp("\\r\\n"), "\n");
+ TQCString ret=s.copy();
+ ret.replace(TQRegExp("\\r\\n"), "\n");
return ret;
}
-QCString CRLFtoLF(const char *s)
+TQCString CRLFtoLF(const char *s)
{
- QCString ret=s;
- ret.replace(QRegExp("\\r\\n"), "\n");
+ TQCString ret=s;
+ ret.replace(TQRegExp("\\r\\n"), "\n");
return ret;
}
-QCString LFtoCRLF(const QCString &s)
+TQCString LFtoCRLF(const TQCString &s)
{
- QCString ret=s.copy();
- ret.replace(QRegExp("\\n"), "\r\n");
+ TQCString ret=s.copy();
+ ret.replace(TQRegExp("\\n"), "\r\n");
return ret;
}
-void removeQuots(QCString &str)
+void removeQuots(TQCString &str)
{
bool inQuote=false;
@@ -449,7 +449,7 @@ void removeQuots(QCString &str)
}
-void removeQuots(QString &str)
+void removeQuots(TQString &str)
{
bool inQuote=false;
@@ -466,7 +466,7 @@ void removeQuots(QString &str)
}
-void addQuotes(QCString &str, bool forceQuotes)
+void addQuotes(TQCString &str, bool forceQuotes)
{
bool needsQuotes=false;
for (unsigned int i=0; i < str.length(); i++) {
@@ -507,7 +507,7 @@ DateFormatter::setFormat( FormatType t )
}
QString
-DateFormatter::dateString( time_t otime , const QString& lang ,
+DateFormatter::dateString( time_t otime , const TQString& lang ,
bool shortFormat, bool includeSecs ) const
{
switch ( mFormat ) {
@@ -527,11 +527,11 @@ DateFormatter::dateString( time_t otime , const QString& lang ,
return custom( otime );
break;
}
- return QString::null;
+ return TQString::null;
}
QString
-DateFormatter::dateString(const QDateTime& dtime, const QString& lang,
+DateFormatter::dateString(const TQDateTime& dtime, const TQString& lang,
bool shortFormat, bool includeSecs ) const
{
return DateFormatter::dateString( qdateToTimeT(dtime), lang, shortFormat, includeSecs );
@@ -540,8 +540,8 @@ DateFormatter::dateString(const QDateTime& dtime, const QString& lang,
QCString
DateFormatter::rfc2822(time_t otime) const
{
- QDateTime tmp;
- QCString ret;
+ TQDateTime tmp;
+ TQCString ret;
tmp.setTime_t(otime);
@@ -555,11 +555,11 @@ QString
DateFormatter::custom(time_t t) const
{
if ( mCustomFormat.isEmpty() )
- return QString::null;
+ return TQString::null;
int z = mCustomFormat.find("Z");
- QDateTime d;
- QString ret = mCustomFormat;
+ TQDateTime d;
+ TQString ret = mCustomFormat;
d.setTime_t(t);
if ( z != -1 ) {
@@ -572,7 +572,7 @@ DateFormatter::custom(time_t t) const
}
void
-DateFormatter::setCustomFormat(const QString& format)
+DateFormatter::setCustomFormat(const TQString& format)
{
mCustomFormat = format;
mFormat = Custom;
@@ -588,7 +588,7 @@ DateFormatter::getCustomFormat() const
QCString
DateFormatter::zone(time_t otime) const
{
- QCString ret;
+ TQCString ret;
#if defined(HAVE_TIMEZONE) || defined(HAVE_TM_GMTOFF)
struct tm *local = localtime( &otime );
#endif
@@ -629,8 +629,8 @@ DateFormatter::zone(time_t otime) const
#else
- QDateTime d1 = QDateTime::fromString( asctime(gmtime(&otime)) );
- QDateTime d2 = QDateTime::fromString( asctime(localtime(&otime)) );
+ TQDateTime d1 = TQDateTime::fromString( asctime(gmtime(&otime)) );
+ TQDateTime d2 = TQDateTime::fromString( asctime(localtime(&otime)) );
int secs = d1.secsTo(d2);
int neg = (secs<0)?1:0;
secs = abs(secs);
@@ -645,14 +645,14 @@ DateFormatter::zone(time_t otime) const
}
time_t
-DateFormatter::qdateToTimeT(const QDateTime& dt) const
+DateFormatter::qdateToTimeT(const TQDateTime& dt) const
{
- QDateTime epoch( QDate(1970, 1,1), QTime(00,00,00) );
+ TQDateTime epoch( TQDate(1970, 1,1), TQTime(00,00,00) );
time_t otime;
time( &otime );
- QDateTime d1 = QDateTime::fromString( asctime(gmtime(&otime)) );
- QDateTime d2 = QDateTime::fromString( asctime(localtime(&otime)) );
+ TQDateTime d1 = TQDateTime::fromString( asctime(gmtime(&otime)) );
+ TQDateTime d2 = TQDateTime::fromString( asctime(localtime(&otime)) );
time_t drf = epoch.secsTo( dt ) - d1.secsTo( d2 );
return drf;
@@ -671,7 +671,7 @@ DateFormatter::fancy(time_t otime) const
mDate.setTime_t( mCurrentTime );
}
- QDateTime old;
+ TQDateTime old;
old.setTime_t( otime );
// not more than an hour in the future
@@ -685,7 +685,7 @@ DateFormatter::fancy(time_t otime) const
formatTime( old.time(), true ) );
}
if ( diff < 2 * 24 * 60 * 60 ) {
- QDateTime yesterday( mDate.addDays( -1 ) );
+ TQDateTime yesterday( mDate.addDays( -1 ) );
if ( old.date().year() == yesterday.date().year() &&
old.date().dayOfYear() == yesterday.date().dayOfYear() )
return i18n( "Yesterday %1" ).arg( locale->
@@ -693,7 +693,7 @@ DateFormatter::fancy(time_t otime) const
}
for ( int i = 3; i < 7; i++ )
if ( diff < i * 24 * 60 * 60 ) {
- QDateTime weekday( mDate.addDays( -i + 1 ) );
+ TQDateTime weekday( mDate.addDays( -i + 1 ) );
if ( old.date().year() == weekday.date().year() &&
old.date().dayOfYear() == weekday.date().dayOfYear() )
return i18n( "1. weekday, 2. time", "%1 %2" ).
@@ -712,10 +712,10 @@ DateFormatter::fancy(time_t otime) const
QString
DateFormatter::localized(time_t otime, bool shortFormat, bool includeSecs,
- const QString& localeLanguage ) const
+ const TQString& localeLanguage ) const
{
- QDateTime tmp;
- QString ret;
+ TQDateTime tmp;
+ TQString ret;
KLocale *locale = KGlobal::locale();
tmp.setTime_t( otime );
@@ -737,7 +737,7 @@ DateFormatter::localized(time_t otime, bool shortFormat, bool includeSecs,
QString
DateFormatter::cTime(time_t otime) const
{
- return QString::fromLatin1( ctime( &otime ) ).stripWhiteSpace() ;
+ return TQString::fromLatin1( ctime( &otime ) ).stripWhiteSpace() ;
}
QString
@@ -745,7 +745,7 @@ DateFormatter::isoDate(time_t otime) const
{
char cstr[64];
strftime( cstr, 63, "%Y-%m-%d %H:%M:%S", localtime(&otime) );
- return QString( cstr );
+ return TQString( cstr );
}
@@ -757,7 +757,7 @@ DateFormatter::reset()
QString
DateFormatter::formatDate(DateFormatter::FormatType t, time_t otime,
- const QString& data, bool shortFormat, bool includeSecs )
+ const TQString& data, bool shortFormat, bool includeSecs )
{
DateFormatter f( t );
if ( t == DateFormatter::Custom ) {
@@ -767,7 +767,7 @@ DateFormatter::formatDate(DateFormatter::FormatType t, time_t otime,
}
QString
-DateFormatter::formatCurrentDate( DateFormatter::FormatType t, const QString& data,
+DateFormatter::formatCurrentDate( DateFormatter::FormatType t, const TQString& data,
bool shortFormat, bool includeSecs )
{
DateFormatter f( t );
diff --git a/libkmime/kmime_util.h b/libkmime/kmime_util.h
index ed8710c92..e2b3c8334 100644
--- a/libkmime/kmime_util.h
+++ b/libkmime/kmime_util.h
@@ -16,27 +16,27 @@
#ifndef __KMIME_UTIL_H__
#define __KMIME_UTIL_H__
-#include "qdatetime.h"
-#include "qstring.h"
-#include "qcstring.h"
-#include "qvaluelist.h"
+#include "tqdatetime.h"
+#include "tqstring.h"
+#include "tqcstring.h"
+#include "tqvaluelist.h"
#include "time.h"
#include <kdepimmacros.h>
-typedef QValueList<QCString> QCStringList;
+typedef TQValueList<TQCString> QCStringList;
namespace KMime {
/** Consult the charset cache. Only used for reducing mem usage by
keeping strings in a common repository.*/
- extern const char* cachedCharset(const QCString &name) KDE_EXPORT;
+ extern const char* cachedCharset(const TQCString &name) KDE_EXPORT;
/** Consult the language cache. Only used for reducing mem usage by
keeping strings in a common repository.*/
- extern const char* cachedLanguage(const QCString &name) KDE_EXPORT;
+ extern const char* cachedLanguage(const TQCString &name) KDE_EXPORT;
/** checks whether @p s contains any non-us-ascii characters */
- extern bool isUsAscii(const QString &s) KDE_EXPORT;
+ extern bool isUsAscii(const TQString &s) KDE_EXPORT;
inline bool isOfSet(const uchar map[16], unsigned char ch) {
Q_ASSERT( ch < 128 );
@@ -74,15 +74,15 @@ namespace KMime {
@param forceCS force the use of the default charset.
@return the decoded string.
*/
- extern QString decodeRFC2047String(const QCString &src, const char **usedCS,
- const QCString &defaultCS, bool forceCS) KDE_EXPORT;
+ extern TQString decodeRFC2047String(const TQCString &src, const char **usedCS,
+ const TQCString &defaultCS, bool forceCS) KDE_EXPORT;
/** Decode string @p src according to RFC2047 (ie. the
=?charset?[qb]?encoded?= construct).
@param src source string.
@return the decoded string.
*/
- extern QString decodeRFC2047String(const QCString &src) KDE_EXPORT;
+ extern TQString decodeRFC2047String(const TQCString &src) KDE_EXPORT;
/** Encode string @p src according to RFC2047 using charset
@p charset.
@@ -94,7 +94,7 @@ namespace KMime {
are allowed.
@return the encoded string.
*/
- extern QCString encodeRFC2047String(const QString &src, const char *charset,
+ extern TQCString encodeRFC2047String(const TQString &src, const char *charset,
bool addressHeader=false, bool allow8bitHeaders=false) KDE_EXPORT;
/** Uses current time, pid and random numbers to construct a string
@@ -103,7 +103,7 @@ namespace KMime {
@return the unique string.
@see multiPartBoundary
*/
- extern QCString uniqueString() KDE_EXPORT;
+ extern TQCString uniqueString() KDE_EXPORT;
/** Constructs a random string (sans leading/trailing "--") that can
be used as a multipart delimiter (ie. as @p boundary parameter
@@ -111,16 +111,16 @@ namespace KMime {
@return the randomized string.
@see uniqueString
*/
- extern QCString multiPartBoundary() KDE_EXPORT;
+ extern TQCString multiPartBoundary() KDE_EXPORT;
/** Tries to extract the header with name @p name from the string
@p src, unfolding it if necessary.
@param src the source string.
@param name the name of the header to search for.
@return the first instance of the header @p name in @p src
- or a null QCString if no such header was found.
+ or a null TQCString if no such header was found.
*/
- extern QCString extractHeader(const QCString &src, const char *name) KDE_EXPORT;
+ extern TQCString extractHeader(const TQCString &src, const char *name) KDE_EXPORT;
/** Converts all occurrences of "\r\n" (CRLF) in @p s to "\n" (LF).
This function is expensive and should be used only if the mail
@@ -130,7 +130,7 @@ namespace KMime {
@return the string with CRLF's substitued for LF's
@see CRLFtoLF(const char*) LFtoCRLF
*/
- extern QCString CRLFtoLF(const QCString &s) KDE_EXPORT;
+ extern TQCString CRLFtoLF(const TQCString &s) KDE_EXPORT;
/** Converts all occurrences of "\r\n" (CRLF) in @p s to "\n" (LF).
This function is expensive and should be used only if the mail
@@ -138,9 +138,9 @@ namespace KMime {
line endings.
@param s source string containing CRLF's
@return the string with CRLF's substitued for LF's
- @see CRLFtoLF(const QCString&) LFtoCRLF
+ @see CRLFtoLF(const TQCString&) LFtoCRLF
*/
- extern QCString CRLFtoLF(const char *s) KDE_EXPORT;
+ extern TQCString CRLFtoLF(const char *s) KDE_EXPORT;
/** Converts all occurrences of "\n" (LF) in @p s to "\r\n" (CRLF).
This function is expensive and should be used only if the mail
@@ -150,29 +150,29 @@ namespace KMime {
@param s source string containing CRLF's
@return the string with CRLF's substitued for LF's
- @see CRLFtoLF(const QCString&) LFtoCRLF
+ @see CRLFtoLF(const TQCString&) LFtoCRLF
*/
- extern QCString LFtoCRLF(const QCString &s) KDE_EXPORT;
+ extern TQCString LFtoCRLF(const TQCString &s) KDE_EXPORT;
/** Removes quote (DQUOTE) characters and decodes "quoted-pairs"
(ie. backslash-escaped characters)
@param str the string to work on.
@see addQuotes
*/
- KDE_EXPORT extern void removeQuots(QCString &str);
+ KDE_EXPORT extern void removeQuots(TQCString &str);
/** Removes quote (DQUOTE) characters and decodes "quoted-pairs"
(ie. backslash-escaped characters)
@param str the string to work on.
@see addQuotes
*/
- KDE_EXPORT extern void removeQuots(QString &str);
+ KDE_EXPORT extern void removeQuots(TQString &str);
/** Converts the given string into a quoted-string if
the string contains any special characters
(ie. one of ()<>@,.;:[]=\").
@param str us-ascii string to work on.
@param forceQuotes if @p true, always add quote characters.
*/
- KDE_EXPORT extern void addQuotes(QCString &str, bool forceQuotes);
+ KDE_EXPORT extern void addQuotes(TQCString &str, bool forceQuotes);
/**
@@ -226,12 +226,12 @@ namespace KMime {
* @param shortFormat used <em>only</em> by the Localized format, is passed to KLocale::formatDateTime
* @param includeSecs used <em>only</em> by the Localized format, is passed to KLocale::formatDateTime
*/
- QString dateString(time_t otime, const QString& lang = QString::null,
+ TQString dateString(time_t otime, const TQString& lang = TQString::null,
bool shortFormat = true, bool includeSecs=false) const;
/**
* overloaded, does exactly what #dateString does (it's slower)
*/
- QString dateString(const QDateTime& dtime, const QString& lang = QString::null,
+ TQString dateString(const TQDateTime& dtime, const TQString& lang = TQString::null,
bool shortFormat = true, bool includeSecs=false) const;
@@ -239,19 +239,19 @@ namespace KMime {
* makes the class use the custom format for
* date to string conversions.
* Method accepts the same arguments
- * as QDateTime::toString method and adds
+ * as TQDateTime::toString method and adds
* "Z" expression which is substituted with the
* RFC-822 style numeric timezone (-0500)
* @param format the custom format
*/
- void setCustomFormat(const QString& format);
- QString getCustomFormat() const;
+ void setCustomFormat(const TQString& format);
+ TQString getCustomFormat() const;
/**
* returns rfc2822 formatted string
* @param otime time to use for formatting
*/
- QCString rfc2822(time_t otime) const;
+ TQCString rfc2822(time_t otime) const;
/**
* resets the internal clock
*/
@@ -266,8 +266,8 @@ namespace KMime {
* @param shortFormat used <em>only</em> by the Localized format, is passed to KLocale::formatDateTime
* @param includeSecs used <em>only</em> by the Localized format, is passed to KLocale::formatDateTime
*/
- static QString formatDate( DateFormatter::FormatType t, time_t time,
- const QString& data = QString::null,
+ static TQString formatDate( DateFormatter::FormatType t, time_t time,
+ const TQString& data = TQString::null,
bool shortFormat = true, bool includeSecs=false);
/** convenience function, same as #formatDate
@@ -278,12 +278,12 @@ namespace KMime {
* @param shortFormat used <em>only</em> by the Localized format, is passed to KLocale::formatDateTime
* @param includeSecs used <em>only</em> by the Localized format, is passed to KLocale::formatDateTime
*/
- static QString formatCurrentDate( DateFormatter::FormatType t,
- const QString& data = QString::null,
+ static TQString formatCurrentDate( DateFormatter::FormatType t,
+ const TQString& data = TQString::null,
bool shortFormat = true, bool includeSecs=false);
/** convenience function, same as #rfc2822 */
- static QCString rfc2822FormatDate( time_t time );
+ static TQCString rfc2822FormatDate( time_t time );
static bool isDaylight();
protected:
/**
@@ -291,7 +291,7 @@ namespace KMime {
* @param otime time to format
* @internal
*/
- QString fancy(time_t otime) const ;
+ TQString fancy(time_t otime) const ;
/**
* returns localized formatted date string
* @param otime time to format
@@ -300,18 +300,18 @@ namespace KMime {
* @param localeLanguage language used for formatting
* @internal
*/
- QString localized(time_t otime, bool shortFormat = true, bool includeSecs = false,
- const QString& localeLanguage=QString::null ) const;
+ TQString localized(time_t otime, bool shortFormat = true, bool includeSecs = false,
+ const TQString& localeLanguage=TQString::null ) const;
/**
* returns string as formatted with ctime function
* @internal
*/
- QString cTime(time_t otime) const;
+ TQString cTime(time_t otime) const;
/**
* returns a string in the "%Y-%m-%d %H:%M:%S" format
* @internal
*/
- QString isoDate(time_t otime) const;
+ TQString isoDate(time_t otime) const;
/**
* returns date formatted with the earlier
@@ -319,19 +319,19 @@ namespace KMime {
* @param t time used for formatting
* @internal
*/
- QString custom(time_t t) const;
+ TQString custom(time_t t) const;
/**
* returns a string identifying the timezone (eg."-0500")
* @internal
*/
- QCString zone(time_t otime) const;
+ TQCString zone(time_t otime) const;
- time_t qdateToTimeT(const QDateTime& dt) const;
+ time_t qdateToTimeT(const TQDateTime& dt) const;
private:
FormatType mFormat;
mutable time_t mCurrentTime;
- mutable QDateTime mDate;
- QString mCustomFormat;
+ mutable TQDateTime mDate;
+ TQString mCustomFormat;
static int mDaylight;
};
diff --git a/libkmime/kmime_warning.h b/libkmime/kmime_warning.h
index 97b714a9e..f4cd1ff2a 100644
--- a/libkmime/kmime_warning.h
+++ b/libkmime/kmime_warning.h
@@ -8,7 +8,7 @@
# define KMIME_WARN_UNKNOWN_CHARSET(c) KMIME_WARN << "unknown charset \"" \
<< c << "\" in RFC 2047 encoded-word" << endl;
# define KMIME_WARN_8BIT(ch) KMIME_WARN \
- << "8Bit character '" << QString(QChar(ch)) << "'" << endl
+ << "8Bit character '" << TQString(TQChar(ch)) << "'" << endl
# define KMIME_WARN_IF_8BIT(ch) if ( (unsigned char)(ch) > 127 ) \
{ KMIME_WARN_8BIT(ch); }
# define KMIME_WARN_PREMATURE_END_OF(x) KMIME_WARN \
@@ -18,7 +18,7 @@
# define KMIME_WARN_CTL_OUTSIDE_QS(x) KMIME_WARN << "Control character " \
#x " outside quoted-string" << endl
# define KMIME_WARN_INVALID_X_IN_Y(X,Y) KMIME_WARN << "Invalid character '" \
- QString(QChar(X)) << "' in " #Y << endl;
+ TQString(TQChar(X)) << "' in " #Y << endl;
# define KMIME_WARN_TOO_LONG(x) KMIME_WARN << #x \
" too long or missing delimiter" << endl;
#else
diff --git a/libkmime/kqcstringsplitter.cpp b/libkmime/kqcstringsplitter.cpp
index fdd6dff09..2038f4f25 100644
--- a/libkmime/kqcstringsplitter.cpp
+++ b/libkmime/kqcstringsplitter.cpp
@@ -30,7 +30,7 @@ KQCStringSplitter::~KQCStringSplitter()
-void KQCStringSplitter::init(const QCString &str, const char *s)
+void KQCStringSplitter::init(const TQCString &str, const char *s)
{
sep=s;
src=str;
diff --git a/libkmime/kqcstringsplitter.h b/libkmime/kqcstringsplitter.h
index 14947643b..7e3c4dd0b 100644
--- a/libkmime/kqcstringsplitter.h
+++ b/libkmime/kqcstringsplitter.h
@@ -17,7 +17,7 @@
#ifndef KQCSTRINGSPLITTER_H
#define KQCSTRINGSPLITTER_H
-#include <qcstring.h>
+#include <tqcstring.h>
#include <kdepimmacros.h>
@@ -29,7 +29,7 @@ class KDE_EXPORT KQCStringSplitter {
void reset() { start=0; end=0; sep=""; incSep=false;}
- void init(const QCString &str, const char *s);
+ void init(const TQCString &str, const char *s);
void init(const char *str, const char *s);
void setIncludeSep(bool inc) { incSep=inc; }
@@ -39,11 +39,11 @@ class KDE_EXPORT KQCStringSplitter {
bool next();
bool prev();
- QCString& string() { return dst; }
- const QCString& source() { return src; }
+ TQCString& string() { return dst; }
+ const TQCString& source() { return src; }
private:
- QCString src, dst, sep;
+ TQCString src, dst, sep;
int start,end;
bool incSep;
diff --git a/libkmime/tests/test_charfreq.cpp b/libkmime/tests/test_charfreq.cpp
index c5b708819..50f2809d8 100644
--- a/libkmime/tests/test_charfreq.cpp
+++ b/libkmime/tests/test_charfreq.cpp
@@ -6,7 +6,7 @@
#include <iostream>
-#include <qfile.h>
+#include <tqfile.h>
using namespace std;
using namespace KMime;
@@ -28,12 +28,12 @@ static const char * typeToString( int type ) {
int main( int argc, char **argv ) {
for ( int i = 1 /*not program*/ ; i < argc ; i++ ) {
- QFile in( argv[i] );
+ TQFile in( argv[i] );
if ( !in.open( IO_ReadOnly ) ) {
cerr << argv[i] << ": does not exist!" << endl;
continue;
}
- QByteArray ba = in.readAll();
+ TQByteArray ba = in.readAll();
CharFreq cf( ba );
cout << argv[i] << ": " << typeToString(cf.type()) << endl;
}
diff --git a/libkmime/tests/test_dates.cpp b/libkmime/tests/test_dates.cpp
index f70269282..7087a01a6 100644
--- a/libkmime/tests/test_dates.cpp
+++ b/libkmime/tests/test_dates.cpp
@@ -21,9 +21,9 @@ main()
t.setFormat(DateFormatter::Iso);
kdDebug()<<"\tIso : \t"<<t.dateString(ntime)<<endl;
kdDebug()<<"\trfc2822 : \t"<<t.rfc2822(ntime)<<endl;
- QString rfcd = t.rfc2822(ntime);
+ TQString rfcd = t.rfc2822(ntime);
Types::DateTime dt;
- QDateTime qdt;
+ TQDateTime qdt;
const char *str = rfcd.latin1();
if ( HeaderParsing::parseDateTime( str, str + rfcd.length(), dt ) ) {
kdDebug()<<"@@@ ntime = "<<(ntime)<<", dt = "<<(dt.time)<<endl;
@@ -31,7 +31,7 @@ main()
kdDebug()<<"@@@ qq = "<< qdt.toString("ddd, dd MMM yyyy hh:mm:ss") <<endl;
kdDebug()<<"@@@ rfc2822 : "<<t.rfc2822(dt.time)<<endl;
}
- QString ddd = "Mon, 05 Aug 2002 01:57:51 -0700";
+ TQString ddd = "Mon, 05 Aug 2002 01:57:51 -0700";
str = ddd.latin1();
if ( HeaderParsing::parseDateTime( str, str + ddd.length(), dt ) ) {
kdDebug()<<"dt = "<<(dt.time)<<endl;
@@ -79,15 +79,15 @@ main()
kdDebug()<<"\tCustom : \t"<< DateFormatter::formatDate( DateFormatter::Custom, ntime,
"Z MMMM dddd yyyy") <<endl;
t.setFormat(DateFormatter::Fancy);
- kdDebug()<<"QDateTime taking: (dates as in first test)"<<endl;
- kdDebug()<<"\tFancy : \t"<<t.dateString((QDateTime::currentDateTime()))<<endl;
+ kdDebug()<<"TQDateTime taking: (dates as in first test)"<<endl;
+ kdDebug()<<"\tFancy : \t"<<t.dateString((TQDateTime::currentDateTime()))<<endl;
t.setFormat(DateFormatter::Localized);
- kdDebug()<<"\tLocalized : \t"<<t.dateString(QDateTime::currentDateTime())<<endl;
+ kdDebug()<<"\tLocalized : \t"<<t.dateString(TQDateTime::currentDateTime())<<endl;
t.setFormat(DateFormatter::CTime);
- kdDebug()<<"\tCTime : \t"<<t.dateString(QDateTime::currentDateTime())<<endl;
+ kdDebug()<<"\tCTime : \t"<<t.dateString(TQDateTime::currentDateTime())<<endl;
t.setFormat(DateFormatter::Iso);
- kdDebug()<<"\tIso : \t"<<t.dateString(QDateTime::currentDateTime())<<endl;
+ kdDebug()<<"\tIso : \t"<<t.dateString(TQDateTime::currentDateTime())<<endl;
t.setCustomFormat("MMMM d dddd yyyy Z");
- kdDebug()<<"\tCustom : \t"<<t.dateString(QDateTime::currentDateTime())<<endl;
+ kdDebug()<<"\tCustom : \t"<<t.dateString(TQDateTime::currentDateTime())<<endl;
}
diff --git a/libkmime/tests/test_kmime_codec.cpp b/libkmime/tests/test_kmime_codec.cpp
index f13b2b434..e30a89ac9 100644
--- a/libkmime/tests/test_kmime_codec.cpp
+++ b/libkmime/tests/test_kmime_codec.cpp
@@ -24,8 +24,8 @@
#include <getopt.h>
#include <cassert>
-#include <qfile.h>
-#include <qcstring.h> // QByteArray
+#include <tqfile.h>
+#include <tqcstring.h> // QByteArray
using namespace KMime;
using namespace std;
@@ -81,19 +81,19 @@ static bool withCRLF = false;
static bool withFinish = true;
static bool verbose = false;
-void encode_decode_kio( bool, const Codec *, const QByteArray &, QFile & );
+void encode_decode_kio( bool, const Codec *, const TQByteArray &, TQFile & );
void encode_decode_chunkwise( bool, const Codec *,
- const QByteArray &, QFile & );
-void encode_decode_convenience_qba( bool, const Codec *, const QByteArray &,
- QFile & );
+ const TQByteArray &, TQFile & );
+void encode_decode_convenience_qba( bool, const Codec *, const TQByteArray &,
+ TQFile & );
int main( int argc, char * argv[] ) {
int iterations = 1;
bool encode = false;
bool decode = false;
- QCString outfilename, infilename;
- QCString encodingName;
+ TQCString outfilename, infilename;
+ TQCString encodingName;
// options parsing:
while( 1 ) {
@@ -104,12 +104,12 @@ int main( int argc, char * argv[] ) {
case 0: // encode
if ( !optarg || !*optarg ) missingParameterTo( "--encode." );
encode = true;
- encodingName = QCString(optarg);
+ encodingName = TQCString(optarg);
break;
case 1: // decode
if ( !optarg || !*optarg ) missingParameterTo( "--decode" );
decode = true;
- encodingName = QCString(optarg);
+ encodingName = TQCString(optarg);
break;
case 2: // output-buffer-size
if ( !optarg || (outbufsize = atoi( optarg )) < 1 )
@@ -121,7 +121,7 @@ int main( int argc, char * argv[] ) {
break;
case 4: // outfile
if ( !optarg || !*optarg ) missingParameterTo( "--outfile" );
- outfilename = QCString(optarg);
+ outfilename = TQCString(optarg);
writing = true;
break;
case 5: // with-crlf
@@ -167,7 +167,7 @@ int main( int argc, char * argv[] ) {
if ( optind != argc - 1 ) usage();
- QFile infile( argv[ optind ] );
+ TQFile infile( argv[ optind ] );
if (!infile.exists()) {
kdDebug() << "infile \"" << infile.name() << "\" does not exist!" << endl;
return INFILE_READ_ERR;
@@ -178,7 +178,7 @@ int main( int argc, char * argv[] ) {
return INFILE_READ_ERR;
}
- QFile outfile( outfilename );
+ TQFile outfile( outfilename );
if ( !outfilename.isEmpty() ) {
if (!outfile.open( IO_WriteOnly|IO_Truncate )) {
kdDebug() << "cannot open " << outfile.name() << " for writing!"
@@ -206,7 +206,7 @@ int main( int argc, char * argv[] ) {
return UNKNOWN_CODEC;
}
- QByteArray infile_buffer = infile.readAll();
+ TQByteArray infile_buffer = infile.readAll();
for ( int i = 0 ; i < iterations ; ++i ) {
kdDebug( verbose ) << "starting iteration " << i+1
@@ -230,10 +230,10 @@ int main( int argc, char * argv[] ) {
}
void encode_decode_convenience_qba( bool encode, const Codec * codec,
- const QByteArray & infile_buffer,
- QFile & outfile )
+ const TQByteArray & infile_buffer,
+ TQFile & outfile )
{
- QByteArray out;
+ TQByteArray out;
if ( encode )
out = codec->encode( infile_buffer, withCRLF );
else
@@ -244,13 +244,13 @@ void encode_decode_convenience_qba( bool encode, const Codec * codec,
}
}
-void encode_kio_internal( Encoder * enc, QByteArray::ConstIterator & iit,
- QByteArray::ConstIterator & iend,
- QByteArray & out )
+void encode_kio_internal( Encoder * enc, TQByteArray::ConstIterator & iit,
+ TQByteArray::ConstIterator & iend,
+ TQByteArray & out )
{
out.resize( outbufsize );
- QByteArray::Iterator oit = out.begin();
- QByteArray::ConstIterator oend = out.end();
+ TQByteArray::Iterator oit = out.begin();
+ TQByteArray::ConstIterator oend = out.end();
while ( !enc->encode( iit, iend, oit, oend ) )
if ( oit == oend ) return;
@@ -261,12 +261,12 @@ void encode_kio_internal( Encoder * enc, QByteArray::ConstIterator & iit,
out.truncate( oit - out.begin() );
}
-void decode_kio_internal( Decoder * dec, QByteArray::ConstIterator & iit,
- QByteArray::ConstIterator & iend,
- QByteArray & out ) {
+void decode_kio_internal( Decoder * dec, TQByteArray::ConstIterator & iit,
+ TQByteArray::ConstIterator & iend,
+ TQByteArray & out ) {
out.resize( outbufsize );
- QByteArray::Iterator oit = out.begin();
- QByteArray::ConstIterator oend = out.end();
+ TQByteArray::Iterator oit = out.begin();
+ TQByteArray::ConstIterator oend = out.end();
while ( !dec->decode( iit, iend, oit, oend ) )
if ( oit == oend ) return;
@@ -278,7 +278,7 @@ void decode_kio_internal( Decoder * dec, QByteArray::ConstIterator & iit,
}
void encode_decode_kio( bool encode, const Codec * codec,
- const QByteArray & infile_buffer, QFile & outfile )
+ const TQByteArray & infile_buffer, TQFile & outfile )
{
Encoder * enc = 0;
@@ -293,12 +293,12 @@ void encode_decode_kio( bool encode, const Codec * codec,
assert( dec );
}
- QByteArray::ConstIterator iit = infile_buffer.begin();
- QByteArray::ConstIterator iend = infile_buffer.end();
+ TQByteArray::ConstIterator iit = infile_buffer.begin();
+ TQByteArray::ConstIterator iend = infile_buffer.end();
- QByteArray out;
+ TQByteArray out;
do {
- out = QByteArray();
+ out = TQByteArray();
if ( encode )
encode_kio_internal( enc, iit, iend, out );
else
@@ -316,14 +316,14 @@ void encode_decode_kio( bool encode, const Codec * codec,
}
void encode_decode_chunkwise( bool encode, const Codec * codec,
- const QByteArray & infile_buffer, QFile & outfile )
+ const TQByteArray & infile_buffer, TQFile & outfile )
{
Encoder * enc = 0;
Decoder * dec = 0;
- QByteArray indata( inbufsize );
- QByteArray outdata( outbufsize );
+ TQByteArray indata( inbufsize );
+ TQByteArray outdata( outbufsize );
// we're going to need this below:
#define write_full_outdata_then_reset do { \
@@ -354,8 +354,8 @@ void encode_decode_chunkwise( bool encode, const Codec * codec,
// Initialize the output iterators:
- QByteArray::Iterator oit = outdata.begin();
- QByteArray::Iterator oend = outdata.end();
+ TQByteArray::Iterator oit = outdata.begin();
+ TQByteArray::Iterator oend = outdata.end();
// Get an encoder. This one you have to delete!
if ( encode ) {
@@ -379,8 +379,8 @@ void encode_decode_chunkwise( bool encode, const Codec * codec,
<< indata.size() << ") from input." << endl;
// setup input iterators:
- QByteArray::ConstIterator iit = indata.begin();
- QByteArray::ConstIterator iend = indata.begin() + reallyRead;
+ TQByteArray::ConstIterator iit = indata.begin();
+ TQByteArray::ConstIterator iend = indata.begin() + reallyRead;
if ( encode ) {
//
diff --git a/libkmime/tests/test_kmime_header_parsing.cpp b/libkmime/tests/test_kmime_header_parsing.cpp
index 3839bff7e..93c447ebd 100644
--- a/libkmime/tests/test_kmime_header_parsing.cpp
+++ b/libkmime/tests/test_kmime_header_parsing.cpp
@@ -4,9 +4,9 @@
#include <kinstance.h>
-#include <qfile.h>
-#include <qcstring.h>
-//#include <qstring.h>
+#include <tqfile.h>
+#include <tqcstring.h>
+//#include <tqstring.h>
//#include <stdio.h>
#include <iostream>
@@ -65,7 +65,7 @@ void usage( const char * msg=0 ) {
exit(1);
}
-ostream & operator<<( ostream & stream, const QString & str ) {
+ostream & operator<<( ostream & stream, const TQString & str ) {
return stream << str.utf8().data();
}
@@ -122,18 +122,18 @@ int main( int argc, char * argv[] ) {
KInstance instance( "test_kmime_header_parsing" );
- QFile stdIn;
+ TQFile stdIn;
stdIn.open( IO_ReadOnly, stdin );
- const QByteArray indata = stdIn.readAll();
+ const TQByteArray indata = stdIn.readAll();
stdIn.close();
- QByteArray::ConstIterator iit = indata.begin();
- const QByteArray::ConstIterator iend = indata.end();
+ TQByteArray::ConstIterator iit = indata.begin();
+ const TQByteArray::ConstIterator iend = indata.end();
switch ( index ) {
case 0:
{ // encoded-word
- QString result;
- QCString language;
+ TQString result;
+ TQCString language;
// must have checked for initial '=' already:
bool ok = indata.size() >= 1 && *iit++ == '=' &&
parseEncodedWord( iit, iend, result, language );
@@ -145,7 +145,7 @@ int main( int argc, char * argv[] ) {
break;
case 1:
{ // atom
- QString result = "with 8bit: ";
+ TQString result = "with 8bit: ";
bool ok = parseAtom( iit, iend, result, true );
cout << ( ok ? "OK" : "BAD" ) << endl
@@ -165,7 +165,7 @@ int main( int argc, char * argv[] ) {
break;
case 2:
{ // token
- QString result = "with 8bit: ";
+ TQString result = "with 8bit: ";
bool ok = parseToken( iit, iend, result, true );
cout << ( ok ? "OK" : "BAD" ) << endl
@@ -185,7 +185,7 @@ int main( int argc, char * argv[] ) {
break;
case 3:
{ // quoted-string
- QString result;
+ TQString result;
// must have checked for initial '"' already:
bool ok = *iit++ == '"' &&
parseGenericQuotedString( iit, iend, result, withCRLF, '"', '"' );
@@ -196,7 +196,7 @@ int main( int argc, char * argv[] ) {
break;
case 4:
{ // domain-literal
- QString result;
+ TQString result;
// must have checked for initial '[' already:
bool ok = *iit++ == '[' &&
parseGenericQuotedString( iit, iend, result, withCRLF, '[', ']' );
@@ -207,7 +207,7 @@ int main( int argc, char * argv[] ) {
break;
case 5:
{ // comment
- QString result;
+ TQString result;
// must have checked for initial '(' already:
bool ok = *iit++ == '(' &&
parseComment( iit, iend, result, withCRLF, true );
@@ -218,7 +218,7 @@ int main( int argc, char * argv[] ) {
break;
case 6:
{ // phrase
- QString result;
+ TQString result;
bool ok = parsePhrase( iit, iend, result, withCRLF );
cout << ( ok ? "OK" : "BAD" ) << endl
@@ -227,7 +227,7 @@ int main( int argc, char * argv[] ) {
break;
case 7:
{ // dot-atom
- QString result;
+ TQString result;
bool ok = parseDotAtom( iit, iend, result, withCRLF );
cout << ( ok ? "OK" : "BAD" ) << endl
@@ -236,7 +236,7 @@ int main( int argc, char * argv[] ) {
break;
case 8:
{ // domain
- QString result;
+ TQString result;
bool ok = parseDomain( iit, iend, result, withCRLF );
cout << ( ok ? "OK" : "BAD" ) << endl
@@ -245,12 +245,12 @@ int main( int argc, char * argv[] ) {
break;
case 9:
{ // obs-route
- QStringList result;
+ TQStringList result;
bool ok = parseObsRoute( iit, iend, result, withCRLF, true /*save*/ );
cout << ( ok ? "OK" : "BAD" ) << endl
<< "result: " << result.count() << " domains:" << endl;
- for ( QStringList::ConstIterator it = result.begin() ;
+ for ( TQStringList::ConstIterator it = result.begin() ;
it != result.end() ; ++it )
cout << (*it) << endl;
}
@@ -294,7 +294,7 @@ int main( int argc, char * argv[] ) {
cout << ( ok ? "OK" : "BAD" ) << endl
<< "result.displayName:\n" << result.displayName << endl;
int i = 0;
- for ( QValueList<KMime::Types::Mailbox>::ConstIterator
+ for ( TQValueList<KMime::Types::Mailbox>::ConstIterator
it = result.mailboxList.begin();
it != result.mailboxList.end() ; ++it, ++i )
cout << "result.mailboxList[" << i << "].displayName:\n"
@@ -313,7 +313,7 @@ int main( int argc, char * argv[] ) {
cout << ( ok ? "OK" : "BAD" ) << endl
<< "result.displayName:\n" << endl;
int i = 0;
- for ( QValueList<KMime::Types::Mailbox>::ConstIterator
+ for ( TQValueList<KMime::Types::Mailbox>::ConstIterator
it = result.mailboxList.begin();
it != result.mailboxList.end() ; ++it, ++i )
cout << "result.mailboxList[" << i << "].displayName:\n"
@@ -326,17 +326,17 @@ int main( int argc, char * argv[] ) {
break;
case 15:
{ // address-list
- QValueList<KMime::Types::Address> result;
+ TQValueList<KMime::Types::Address> result;
bool ok = parseAddressList( iit, iend, result, withCRLF );
cout << ( ok ? "OK" : "BAD" ) << endl;
int j = 0;
- for ( QValueList<KMime::Types::Address>::ConstIterator
+ for ( TQValueList<KMime::Types::Address>::ConstIterator
jt = result.begin() ; jt != result.end() ; ++jt, ++j ) {
cout << "result[" << j << "].displayName:\n"
<< (*jt).displayName << endl;
int i = 0;
- for ( QValueList<KMime::Types::Mailbox>::ConstIterator
+ for ( TQValueList<KMime::Types::Mailbox>::ConstIterator
it = (*jt).mailboxList.begin();
it != (*jt).mailboxList.end() ; ++it, ++i )
cout << "result[" << j << "].mailboxList[" << i << "].displayName:\n"
@@ -350,45 +350,45 @@ int main( int argc, char * argv[] ) {
break;
case 16:
{ // parameter
- QPair<QString,KMime::Types::QStringOrQPair> result;
+ QPair<TQString,KMime::Types::QStringOrQPair> result;
bool ok = parseParameter( iit, iend, result, withCRLF );
cout << ( ok ? "OK" : "BAD" ) << endl
<< "result.first (attribute):\n" << result.first << endl
<< "result.second.qstring (value):\n" << result.second.qstring << endl
<< "result.second.qpair (value):\n"
- << QCString( result.second.qpair.first,
+ << TQCString( result.second.qpair.first,
result.second.qpair.second+1 ).data() << endl;
}
break;
case 17:
{ // raw-parameter-list
- QMap<QString,KMime::Types::QStringOrQPair> result;
+ TQMap<TQString,KMime::Types::QStringOrQPair> result;
bool ok = parseRawParameterList( iit, iend, result, withCRLF );
cout << ( ok ? "OK" : "BAD" ) << endl
<< "result: " << result.count() << " raw parameters:" << endl;
int i = 0;
- for ( QMap<QString,KMime::Types::QStringOrQPair>::ConstIterator
+ for ( TQMap<TQString,KMime::Types::QStringOrQPair>::ConstIterator
it = result.begin() ; it != result.end() ; ++it, ++i )
cout << "result[" << i << "].key() (attribute):\n"
<< it.key() << endl
<< "result[" << i << "].data().qstring (value):\n"
<< it.data().qstring << endl
<< "result[" << i << "].data().qpair (value):\n"
- << QCString( it.data().qpair.first,
+ << TQCString( it.data().qpair.first,
it.data().qpair.second+1 ).data() << endl;
}
break;
case 18:
{ // parameter-list
- QMap<QString,QString> result;
+ TQMap<TQString,TQString> result;
bool ok = parseParameterList( iit, iend, result, withCRLF );
cout << ( ok ? "OK" : "BAD" ) << endl
<< "result: " << result.count() << " parameters:" << endl;
int i = 0;
- for ( QMap<QString,QString>::Iterator it = result.begin() ;
+ for ( TQMap<TQString,TQString>::Iterator it = result.begin() ;
it != result.end() ; ++it, ++i )
cout << "result[" << i << "].key() (attribute):\n"
<< it.key() << endl
diff --git a/libkmime/tests/test_mdn.cpp b/libkmime/tests/test_mdn.cpp
index 1bb387f1d..fa9290f20 100644
--- a/libkmime/tests/test_mdn.cpp
+++ b/libkmime/tests/test_mdn.cpp
@@ -1,9 +1,9 @@
#include <kmime_mdn.h>
using namespace KMime::MDN;
-#include <qcstring.h>
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqcstring.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include <iostream>
using std::cout;
@@ -26,14 +26,14 @@ void usage( const char * msg=0 ) {
int main( int argc, char * argv[] ) {
- QString finalRecipient;
- QString originalRecipient;
- QCString originalMessageId;
+ TQString finalRecipient;
+ TQString originalRecipient;
+ TQCString originalMessageId;
ActionMode actionMode = ManualAction;
SendingMode sendingMode = SentManually;
DispositionType dispositionType = Displayed;
- QValueList<DispositionModifier> dispositionModifiers;
- QString special;
+ TQValueList<DispositionModifier> dispositionModifiers;
+ TQString special;
while ( true ) {
int option_index = 0;
@@ -84,7 +84,7 @@ int main( int argc, char * argv[] ) {
case 'f': // --final-recipient
if ( optarg && *optarg )
- finalRecipient = QString::fromUtf8( optarg );
+ finalRecipient = TQString::fromUtf8( optarg );
else
usage( "--final-recipient is missing a value" );
break;
@@ -113,7 +113,7 @@ int main( int argc, char * argv[] ) {
case 'o': // --original-recipient
if ( optarg && *optarg )
- originalRecipient = QString::fromUtf8( optarg );
+ originalRecipient = TQString::fromUtf8( optarg );
else
usage( "--original-recipient is missing a value" );
break;
@@ -133,11 +133,11 @@ int main( int argc, char * argv[] ) {
}
if ( optind < argc )
- special = QString::fromUtf8( argv[optind++] );
+ special = TQString::fromUtf8( argv[optind++] );
if ( optind < argc )
usage( "too many arguments!" );
- QCString result = dispositionNotificationBodyContent( finalRecipient,
+ TQCString result = dispositionNotificationBodyContent( finalRecipient,
originalRecipient.latin1(),
originalMessageId,
dispositionType,