summaryrefslogtreecommitdiffstats
path: root/libkmime
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
commit67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch)
tree5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /libkmime
parent2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff)
downloadtdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz
tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4, however Qt3 builds are OK. Any alterations this commit makes to kdepim behaviour under Qt3 are unintentional and should be fixed. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkmime')
-rw-r--r--libkmime/CLASSTREE.bodyparts2
-rw-r--r--libkmime/CLASSTREE.headers2
-rw-r--r--libkmime/boolflags.h2
-rw-r--r--libkmime/kmime_charfreq.h8
-rw-r--r--libkmime/kmime_codec_base64.cpp6
-rw-r--r--libkmime/kmime_codec_base64.h6
-rw-r--r--libkmime/kmime_codec_identity.cpp10
-rw-r--r--libkmime/kmime_codec_identity.h10
-rw-r--r--libkmime/kmime_codec_qp.cpp38
-rw-r--r--libkmime/kmime_codec_qp.h18
-rw-r--r--libkmime/kmime_codec_uuencode.cpp6
-rw-r--r--libkmime/kmime_codec_uuencode.h6
-rw-r--r--libkmime/kmime_codecs.cpp16
-rw-r--r--libkmime/kmime_codecs.h20
-rw-r--r--libkmime/kmime_content.cpp10
-rw-r--r--libkmime/kmime_content.h2
-rw-r--r--libkmime/kmime_header_parsing.cpp66
-rw-r--r--libkmime/kmime_header_parsing.h22
-rw-r--r--libkmime/kmime_headers.cpp66
-rw-r--r--libkmime/kmime_headers.h24
-rw-r--r--libkmime/kmime_mdn.cpp8
-rw-r--r--libkmime/kmime_mdn.h8
-rw-r--r--libkmime/kmime_message.cpp2
-rw-r--r--libkmime/kmime_newsarticle.cpp2
-rw-r--r--libkmime/kmime_parsers.cpp70
-rw-r--r--libkmime/kmime_util.cpp56
-rw-r--r--libkmime/kmime_util.h18
-rw-r--r--libkmime/kqcstringsplitter.cpp20
-rw-r--r--libkmime/kqcstringsplitter.h10
-rwxr-xr-xlibkmime/tests/run_codec_tests2
-rw-r--r--libkmime/tests/test_charfreq.cpp2
-rw-r--r--libkmime/tests/test_kmime_codec.cpp14
-rw-r--r--libkmime/tests/test_kmime_header_parsing.cpp6
-rw-r--r--libkmime/tests/test_mdn.cpp32
34 files changed, 295 insertions, 295 deletions
diff --git a/libkmime/CLASSTREE.bodyparts b/libkmime/CLASSTREE.bodyparts
index eeaa7726a..5952c2082 100644
--- a/libkmime/CLASSTREE.bodyparts
+++ b/libkmime/CLASSTREE.bodyparts
@@ -15,7 +15,7 @@
+ Message::RFC822
+ Message::Partial
+ Message::ExternalBody
- + Message::DeliveryStatus
+ + Message::DeliverytqStatus
+ GText
+ Text::Plain
+ Text::Enriched
diff --git a/libkmime/CLASSTREE.headers b/libkmime/CLASSTREE.headers
index 0dc759261..5e7a9ee07 100644
--- a/libkmime/CLASSTREE.headers
+++ b/libkmime/CLASSTREE.headers
@@ -59,7 +59,7 @@ bool isEmpty()
const char* type();
-Entity* parent();
+Entity* tqparent();
void setParent( Content* );
diff --git a/libkmime/boolflags.h b/libkmime/boolflags.h
index 71cf669aa..586071eb3 100644
--- a/libkmime/boolflags.h
+++ b/libkmime/boolflags.h
@@ -20,7 +20,7 @@
#include <kdepimmacros.h>
/** This class stores boolean values in single bytes.
- It provides a similar functionality as QBitArray
+ It provides a similar functionality as TQBitArray
but requires much less memory.
We use it to store the flags of an article
@internal
diff --git a/libkmime/kmime_charfreq.h b/libkmime/kmime_charfreq.h
index 8f2c8bda7..125fac223 100644
--- a/libkmime/kmime_charfreq.h
+++ b/libkmime/kmime_charfreq.h
@@ -12,8 +12,8 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
*/
-#ifndef __KMIME_CHARFREQ_H__
-#define __KMIME_CHARFREQ_H__
+#ifndef __KMIME_CHARFRETQ_H__
+#define __KMIME_CHARFRETQ_H__
#include <tqcstring.h>
#include <kdepimmacros.h>
@@ -37,7 +37,7 @@ public:
/** Returns true if buf has trailing whitespace, i.e. if any line ends
with space (' ') or tab ('\t'). */
bool hasTrailingWhitespace() const;
- /** Returns true if buf tqcontains a line that starts with "From ". */
+ /** Returns true if buf contains a line that starts with "From ". */
bool hasLeadingFrom() const;
/** Returns the percentage of printable characters: printable/total.
If total == 0, the result is undefined. */
@@ -65,4 +65,4 @@ private:
} // namespace KMime
-#endif /* __KMIME_CHARFREQ_H__ */
+#endif /* __KMIME_CHARFRETQ_H__ */
diff --git a/libkmime/kmime_codec_base64.cpp b/libkmime/kmime_codec_base64.cpp
index e14e396ab..e1c4d499a 100644
--- a/libkmime/kmime_codec_base64.cpp
+++ b/libkmime/kmime_codec_base64.cpp
@@ -19,11 +19,11 @@
In addition, as a special exception, the copyright holders give
permission to link the code of this library with any edition of
- the Qt library by Trolltech AS, Norway (or with modified versions
- of Qt that use the same license as Qt), and distribute linked
+ the TQt library by Trolltech AS, Norway (or with modified versions
+ of TQt that use the same license as TQt), and distribute linked
combinations including the two. You must obey the GNU General
Public License in all respects for all of the code used other than
- Qt. If you modify this file, you may extend this exception to
+ TQt. If you modify this file, you may extend this exception to
your version of the file, but you are not obligated to do so. If
you do not wish to do so, delete this exception statement from
your version.
diff --git a/libkmime/kmime_codec_base64.h b/libkmime/kmime_codec_base64.h
index 11fa04b73..6d80d9b92 100644
--- a/libkmime/kmime_codec_base64.h
+++ b/libkmime/kmime_codec_base64.h
@@ -19,11 +19,11 @@
In addition, as a special exception, the copyright holders give
permission to link the code of this library with any edition of
- the Qt library by Trolltech AS, Norway (or with modified versions
- of Qt that use the same license as Qt), and distribute linked
+ the TQt library by Trolltech AS, Norway (or with modified versions
+ of TQt that use the same license as TQt), and distribute linked
combinations including the two. You must obey the GNU General
Public License in all respects for all of the code used other than
- Qt. If you modify this file, you may extend this exception to
+ TQt. If you modify this file, you may extend this exception to
your version of the file, but you are not obligated to do so. If
you do not wish to do so, delete this exception statement from
your version.
diff --git a/libkmime/kmime_codec_identity.cpp b/libkmime/kmime_codec_identity.cpp
index dd7951f6b..529084d56 100644
--- a/libkmime/kmime_codec_identity.cpp
+++ b/libkmime/kmime_codec_identity.cpp
@@ -19,11 +19,11 @@
In addition, as a special exception, the copyright holders give
permission to link the code of this library with any edition of
- the Qt library by Trolltech AS, Norway (or with modified versions
- of Qt that use the same license as Qt), and distribute linked
+ the TQt library by Trolltech AS, Norway (or with modified versions
+ of TQt that use the same license as TQt), and distribute linked
combinations including the two. You must obey the GNU General
Public License in all respects for all of the code used other than
- Qt. If you modify this file, you may extend this exception to
+ TQt. If you modify this file, you may extend this exception to
your version of the file, but you are not obligated to do so. If
you do not wish to do so, delete this exception statement from
your version.
@@ -101,8 +101,8 @@ TQByteArray IdentityCodec::decode( const TQByteArray & src, bool withCRLF ) cons
return src;
}
-TQCString IdentityCodec::encodeToQCString( const TQByteArray & src, bool withCRLF ) const {
- kdWarning( withCRLF, 5100 ) << "IdentityCodec::encodeToQCString(): withCRLF not yet supported!" << endl;
+TQCString IdentityCodec::encodeToTQCString( const TQByteArray & src, bool withCRLF ) const {
+ kdWarning( withCRLF, 5100 ) << "IdentityCodec::encodeToTQCString(): withCRLF not yet supported!" << endl;
return TQCString( src.data(), src.size() + 1 );
}
diff --git a/libkmime/kmime_codec_identity.h b/libkmime/kmime_codec_identity.h
index 0757351bb..a18cfd1ff 100644
--- a/libkmime/kmime_codec_identity.h
+++ b/libkmime/kmime_codec_identity.h
@@ -19,11 +19,11 @@
In addition, as a special exception, the copyright holders give
permission to link the code of this library with any edition of
- the Qt library by Trolltech AS, Norway (or with modified versions
- of Qt that use the same license as Qt), and distribute linked
+ the TQt library by Trolltech AS, Norway (or with modified versions
+ of TQt that use the same license as TQt), and distribute linked
combinations including the two. You must obey the GNU General
Public License in all respects for all of the code used other than
- Qt. If you modify this file, you may extend this exception to
+ TQt. If you modify this file, you may extend this exception to
your version of the file, but you are not obligated to do so. If
you do not wish to do so, delete this exception statement from
your version.
@@ -45,7 +45,7 @@ public:
~IdentityCodec() {}
TQByteArray encode( const TQByteArray & src, bool withCRLF ) const;
- TQCString encodeToQCString( const TQByteArray & src, bool withCRLF ) const;
+ TQCString encodeToTQCString( const TQByteArray & src, bool withCRLF ) const;
TQByteArray decode( const TQByteArray & src, bool withCRLF ) const;
int maxEncodedSizeFor( int insize, bool withCRLF ) const {
@@ -105,7 +105,7 @@ public:
return insize;
}
- TQCString encodeToQCString( const TQByteArray &, bool ) const {
+ TQCString encodeToTQCString( const TQByteArray &, bool ) const {
return TQCString();
}
diff --git a/libkmime/kmime_codec_qp.cpp b/libkmime/kmime_codec_qp.cpp
index 6029a31a1..7c579b6a1 100644
--- a/libkmime/kmime_codec_qp.cpp
+++ b/libkmime/kmime_codec_qp.cpp
@@ -19,11 +19,11 @@
In addition, as a special exception, the copyright holders give
permission to link the code of this library with any edition of
- the Qt library by Trolltech AS, Norway (or with modified versions
- of Qt that use the same license as Qt), and distribute linked
+ the TQt library by Trolltech AS, Norway (or with modified versions
+ of TQt that use the same license as TQt), and distribute linked
combinations including the two. You must obey the GNU General
Public License in all respects for all of the code used other than
- Qt. If you modify this file, you may extend this exception to
+ TQt. If you modify this file, you may extend this exception to
your version of the file, but you are not obligated to do so. If
you do not wish to do so, delete this exception statement from
your version.
@@ -125,22 +125,22 @@ class QuotedPrintableDecoder : public Decoder {
@li @p insideHexChar == @p true, @p mAccu != 0:
saw the first nibble '=X'
*/
- const bool mQEncoding;
+ const bool mTQEncoding;
bool mInsideHexChar;
bool mFlushing;
bool mExpectLF;
bool mHaveAccu;
protected:
friend class QuotedPrintableCodec;
- friend class Rfc2047QEncodingCodec;
+ friend class Rfc2047TQEncodingCodec;
friend class Rfc2231EncodingCodec;
QuotedPrintableDecoder( bool withCRLF=false,
- bool aQEncoding=false, char aEscapeChar='=' )
+ bool aTQEncoding=false, char aEscapeChar='=' )
: Decoder( withCRLF ),
mEscapeChar(aEscapeChar),
mBadChar(0),
mAccu(0),
- mQEncoding(aQEncoding),
+ mTQEncoding(aTQEncoding),
mInsideHexChar(false),
mFlushing(false),
mExpectLF(false),
@@ -155,15 +155,15 @@ public:
};
-class Rfc2047QEncodingEncoder : public Encoder {
+class Rfc2047TQEncodingEncoder : public Encoder {
uchar mAccu;
uchar mStepNo;
const char mEscapeChar;
bool mInsideFinishing : 1;
protected:
- friend class Rfc2047QEncodingCodec;
+ friend class Rfc2047TQEncodingCodec;
friend class Rfc2231EncodingCodec;
- Rfc2047QEncodingEncoder( bool withCRLF=false, char aEscapeChar='=' )
+ Rfc2047TQEncodingEncoder( bool withCRLF=false, char aEscapeChar='=' )
: Encoder( withCRLF ),
mAccu(0), mStepNo(0), mEscapeChar( aEscapeChar ),
mInsideFinishing( false )
@@ -182,7 +182,7 @@ protected:
}
public:
- virtual ~Rfc2047QEncodingEncoder() {}
+ virtual ~Rfc2047TQEncodingEncoder() {}
bool encode( const char* & scursor, const char * const send,
char* & dcursor, const char * const dend );
@@ -216,20 +216,20 @@ int QuotedPrintableCodec::maxDecodedSizeFor( int insize, bool withCRLF ) const {
return QuotedPrintableDecoder_maxDecodedSizeFor(insize, withCRLF);
}
-Encoder * Rfc2047QEncodingCodec::makeEncoder( bool withCRLF ) const {
- return new Rfc2047QEncodingEncoder( withCRLF );
+Encoder * Rfc2047TQEncodingCodec::makeEncoder( bool withCRLF ) const {
+ return new Rfc2047TQEncodingEncoder( withCRLF );
}
-Decoder * Rfc2047QEncodingCodec::makeDecoder( bool withCRLF ) const {
+Decoder * Rfc2047TQEncodingCodec::makeDecoder( bool withCRLF ) const {
return new QuotedPrintableDecoder( withCRLF, true );
}
-int Rfc2047QEncodingCodec::maxDecodedSizeFor( int insize, bool withCRLF ) const {
+int Rfc2047TQEncodingCodec::maxDecodedSizeFor( int insize, bool withCRLF ) const {
return QuotedPrintableDecoder_maxDecodedSizeFor(insize, withCRLF);
}
Encoder * Rfc2231EncodingCodec::makeEncoder( bool withCRLF ) const {
- return new Rfc2047QEncodingEncoder( withCRLF, '%' );
+ return new Rfc2047TQEncodingEncoder( withCRLF, '%' );
}
Decoder * Rfc2231EncodingCodec::makeDecoder( bool withCRLF ) const {
@@ -358,7 +358,7 @@ bool QuotedPrintableDecoder::decode( const char* & scursor, const char * const s
if ( ch <= '~' && ch >= ' ' || ch == '\t' ) {
if ( ch == mEscapeChar ) {
mInsideHexChar = true;
- } else if ( mQEncoding && ch == '_' ) {
+ } else if ( mTQEncoding && ch == '_' ) {
*dcursor++ = char(0x20);
} else {
*dcursor++ = char(ch);
@@ -566,7 +566,7 @@ bool QuotedPrintableEncoder::finish( char* & dcursor,
} // finish
-bool Rfc2047QEncodingEncoder::encode( const char* & scursor, const char * const send,
+bool Rfc2047TQEncodingEncoder::encode( const char* & scursor, const char * const send,
char* & dcursor, const char * const dend )
{
if ( mInsideFinishing ) return true;
@@ -611,7 +611,7 @@ bool Rfc2047QEncodingEncoder::encode( const char* & scursor, const char * const
#include <tqstring.h>
-bool Rfc2047QEncodingEncoder::finish( char* & dcursor, const char * const dend ) {
+bool Rfc2047TQEncodingEncoder::finish( char* & dcursor, const char * const dend ) {
mInsideFinishing = true;
// write the last bits of mAccu, if any:
diff --git a/libkmime/kmime_codec_qp.h b/libkmime/kmime_codec_qp.h
index c067fcffe..a80226f56 100644
--- a/libkmime/kmime_codec_qp.h
+++ b/libkmime/kmime_codec_qp.h
@@ -19,18 +19,18 @@
In addition, as a special exception, the copyright holders give
permission to link the code of this library with any edition of
- the Qt library by Trolltech AS, Norway (or with modified versions
- of Qt that use the same license as Qt), and distribute linked
+ the TQt library by Trolltech AS, Norway (or with modified versions
+ of TQt that use the same license as TQt), and distribute linked
combinations including the two. You must obey the GNU General
Public License in all respects for all of the code used other than
- Qt. If you modify this file, you may extend this exception to
+ TQt. If you modify this file, you may extend this exception to
your version of the file, but you are not obligated to do so. If
you do not wish to do so, delete this exception statement from
your version.
*/
-#ifndef __KMIME_CODEC_QP__
-#define __KMIME_CODEC_QP__
+#ifndef __KMIME_CODEC_TQP__
+#define __KMIME_CODEC_TQP__
#include "kmime_codecs.h"
@@ -65,13 +65,13 @@ public:
};
-class Rfc2047QEncodingCodec : public Codec {
+class Rfc2047TQEncodingCodec : public Codec {
protected:
friend class Codec;
- Rfc2047QEncodingCodec() : Codec() {}
+ Rfc2047TQEncodingCodec() : Codec() {}
public:
- virtual ~Rfc2047QEncodingCodec() {}
+ virtual ~Rfc2047TQEncodingCodec() {}
const char * name() const {
return "q";
@@ -118,4 +118,4 @@ public:
} // namespace KMime
-#endif // __KMIME_CODEC_QP__
+#endif // __KMIME_CODEC_TQP__
diff --git a/libkmime/kmime_codec_uuencode.cpp b/libkmime/kmime_codec_uuencode.cpp
index 2c6152a95..fe5acf4f0 100644
--- a/libkmime/kmime_codec_uuencode.cpp
+++ b/libkmime/kmime_codec_uuencode.cpp
@@ -19,11 +19,11 @@
In addition, as a special exception, the copyright holders give
permission to link the code of this library with any edition of
- the Qt library by Trolltech AS, Norway (or with modified versions
- of Qt that use the same license as Qt), and distribute linked
+ the TQt library by Trolltech AS, Norway (or with modified versions
+ of TQt that use the same license as TQt), and distribute linked
combinations including the two. You must obey the GNU General
Public License in all respects for all of the code used other than
- Qt. If you modify this file, you may extend this exception to
+ TQt. If you modify this file, you may extend this exception to
your version of the file, but you are not obligated to do so. If
you do not wish to do so, delete this exception statement from
your version.
diff --git a/libkmime/kmime_codec_uuencode.h b/libkmime/kmime_codec_uuencode.h
index 4bccec391..80288b412 100644
--- a/libkmime/kmime_codec_uuencode.h
+++ b/libkmime/kmime_codec_uuencode.h
@@ -19,11 +19,11 @@
In addition, as a special exception, the copyright holders give
permission to link the code of this library with any edition of
- the Qt library by Trolltech AS, Norway (or with modified versions
- of Qt that use the same license as Qt), and distribute linked
+ the TQt library by Trolltech AS, Norway (or with modified versions
+ of TQt that use the same license as TQt), and distribute linked
combinations including the two. You must obey the GNU General
Public License in all respects for all of the code used other than
- Qt. If you modify this file, you may extend this exception to
+ TQt. If you modify this file, you may extend this exception to
your version of the file, but you are not obligated to do so. If
you do not wish to do so, delete this exception statement from
your version.
diff --git a/libkmime/kmime_codecs.cpp b/libkmime/kmime_codecs.cpp
index 9a55c339d..1476477b6 100644
--- a/libkmime/kmime_codecs.cpp
+++ b/libkmime/kmime_codecs.cpp
@@ -19,11 +19,11 @@
In addition, as a special exception, the copyright holders give
permission to link the code of this library with any edition of
- the Qt library by Trolltech AS, Norway (or with modified versions
- of Qt that use the same license as Qt), and distribute linked
+ the TQt library by Trolltech AS, Norway (or with modified versions
+ of TQt that use the same license as TQt), and distribute linked
combinations including the two. You must obey the GNU General
Public License in all respects for all of the code used other than
- Qt. If you modify this file, you may extend this exception to
+ TQt. If you modify this file, you may extend this exception to
your version of the file, but you are not obligated to do so. If
you do not wish to do so, delete this exception statement from
your version.
@@ -52,7 +52,7 @@ namespace KMime {
// global list of KMime::Codec's
TQAsciiDict<Codec>* Codec::all = 0;
static KStaticDeleter<TQAsciiDict<Codec> > sdAll;
-#if defined(QT_THREAD_SUPPORT)
+#if defined(TQT_THREAD_SUPPORT)
TQMutex* Codec::dictLock = 0;
static KStaticDeleter<TQMutex> sdDictLock;
#endif
@@ -66,7 +66,7 @@ void Codec::fillDictionary() {
all->insert( "base64", new Base64Codec() );
all->insert( "quoted-printable", new QuotedPrintableCodec() );
all->insert( "b", new Rfc2047BEncodingCodec() );
- all->insert( "q", new Rfc2047QEncodingCodec() );
+ all->insert( "q", new Rfc2047TQEncodingCodec() );
all->insert( "x-kmime-rfc2231", new Rfc2231EncodingCodec() );
all->insert( "x-uuencode", new UUCodec() );
//all->insert( "binary", new BinaryCodec() );
@@ -74,7 +74,7 @@ void Codec::fillDictionary() {
}
Codec * Codec::codecForName( const char * name ) {
-#if defined(QT_THREAD_SUPPORT)
+#if defined(TQT_THREAD_SUPPORT)
if ( !dictLock )
sdDictLock.setObject( dictLock, new TQMutex );
dictLock->lock(); // protect "all"
@@ -84,7 +84,7 @@ Codec * Codec::codecForName( const char * name ) {
fillDictionary();
}
Codec * codec = (*all)[ name ];
-#if defined(QT_THREAD_SUPPORT)
+#if defined(TQT_THREAD_SUPPORT)
dictLock->unlock();
#endif
@@ -147,7 +147,7 @@ TQByteArray Codec::encode( const TQByteArray & src, bool withCRLF ) const
return result;
}
-TQCString Codec::encodeToQCString( const TQByteArray & src, bool withCRLF ) const
+TQCString Codec::encodeToTQCString( const TQByteArray & src, bool withCRLF ) const
{
// allocate buffer for the worst case (remember to add one for the trailing NUL)
TQCString result( maxEncodedSizeFor( src.size(), withCRLF ) + 1 );
diff --git a/libkmime/kmime_codecs.h b/libkmime/kmime_codecs.h
index 211867bca..b60d8bb8d 100644
--- a/libkmime/kmime_codecs.h
+++ b/libkmime/kmime_codecs.h
@@ -19,11 +19,11 @@
In addition, as a special exception, the copyright holders give
permission to link the code of this library with any edition of
- the Qt library by Trolltech AS, Norway (or with modified versions
- of Qt that use the same license as Qt), and distribute linked
+ the TQt library by Trolltech AS, Norway (or with modified versions
+ of TQt that use the same license as TQt), and distribute linked
combinations including the two. You must obey the GNU General
Public License in all respects for all of the code used other than
- Qt. If you modify this file, you may extend this exception to
+ TQt. If you modify this file, you may extend this exception to
your version of the file, but you are not obligated to do so. If
you do not wish to do so, delete this exception statement from
your version.
@@ -33,11 +33,11 @@
#define __KMIME_CODECS__
#include <tqasciidict.h>
-#if defined(QT_THREAD_SUPPORT)
+#if defined(TQT_THREAD_SUPPORT)
# include <tqmutex.h>
#endif
-#include <tqcstring.h> // QByteArray
+#include <tqcstring.h> // TQByteArray
#include <kdebug.h> // for kdFatal()
#include <kdepimmacros.h>
@@ -58,7 +58,7 @@ class KDE_EXPORT Codec {
protected:
static TQAsciiDict<Codec>* all;
-#if defined(QT_THREAD_SUPPORT)
+#if defined(TQT_THREAD_SUPPORT)
static TQMutex* dictLock;
#endif
@@ -87,7 +87,7 @@ public:
* This function doesn't support chaining of blocks. The returned
* block cannot be added to, but you don't need to finalize it, too.
*
- * Example usage (@p in tqcontains the input data):
+ * Example usage (@p in contains the input data):
* <pre>
* KMime::Codec * codec = KMime::Codec::codecForName( "base64" );
* kdFatal( !codec ) << "no base64 codec found!?" << endl;
@@ -123,7 +123,7 @@ public:
* This function doesn't support chaining of blocks. The returned
* block cannot be added to, but you don't need to finalize it, too.
*
- * Example usage (@p in tqcontains the input data):
+ * Example usage (@p in contains the input data):
* <pre>
* KMime::Codec * codec = KMime::Codec::codecForName( "base64" );
* kdFatal( !codec ) << "no base64 codec found!?" << endl;
@@ -168,7 +168,7 @@ public:
* domain (ie. not in the binary domain). Codecs that do not fall
* into this category will return a null TQCString.
**/
- virtual TQCString encodeToQCString( const TQByteArray & src, bool withCRLF=false ) const;
+ virtual TQCString encodeToTQCString( const TQByteArray & src, bool withCRLF=false ) const;
/**
* Even more convenient, but also a bit slower and more memory
@@ -230,7 +230,7 @@ public:
* the output and then delete the decoder instance. If you want to
* process another input block sequence, you create a new instance.
*
- * Typical usage (@p in tqcontains the (base64-encoded) input data),
+ * Typical usage (@p in contains the (base64-encoded) input data),
* taking into account all the conventions detailed above:
*
* <pre>
diff --git a/libkmime/kmime_content.cpp b/libkmime/kmime_content.cpp
index b6b6229f0..7ac10bbba 100644
--- a/libkmime/kmime_content.cpp
+++ b/libkmime/kmime_content.cpp
@@ -85,7 +85,7 @@ void Content::setContent(TQStrList *l)
void Content::setContent(const TQCString &s)
{
- int pos=s.find("\n\n", 0);
+ int pos=s.tqfind("\n\n", 0);
if(pos>-1) {
h_ead=s.left(++pos); //header *must* end with "\n" !!
b_ody=s.mid(pos+1, s.length()-pos-1);
@@ -327,7 +327,7 @@ TQCString Content::encodedContent(bool useCrLf)
e+="\n";
//body
- if(!b_ody.isEmpty()) { //this message tqcontains only one part
+ if(!b_ody.isEmpty()) { //this message contains only one part
Headers::CTEncoding *enc=contentTransferEncoding();
if(enc->needToEncode()) {
@@ -630,7 +630,7 @@ void Content::changeEncoding(Headers::contentEncoding e)
if(decodeText())
enc->setCte(e); // text is not encoded until it's sent or saved so we just set the new encoding
- else { // this content tqcontains non textual data, that has to be re-encoded
+ else { // this content contains non textual data, that has to be re-encoded
if(e!=Headers::CEbase64) {
//kdWarning(5003) << "Content::changeEncoding() : non textual data and encoding != base64 - this should not happen\n => forcing base64" << endl;
@@ -664,14 +664,14 @@ Headers::Generic* Content::getNextHeader(TQCString &head)
bool folded(false);
Headers::Generic *header=0;
- pos1 = head.find(": ");
+ pos1 = head.tqfind(": ");
if (pos1>-1) { //there is another header
pos2=pos1+=2; //skip the name
if (head[pos2]!='\n') { // check if the header is not empty
while(1) {
- pos2=head.find("\n", pos2+1);
+ pos2=head.tqfind("\n", pos2+1);
if(pos2==-1 || pos2==len || ( head[pos2+1]!=' ' && head[pos2+1]!='\t') ) //break if we reach the end of the string, honor folded lines
break;
else
diff --git a/libkmime/kmime_content.h b/libkmime/kmime_content.h
index 8c828500f..692f3afe4 100644
--- a/libkmime/kmime_content.h
+++ b/libkmime/kmime_content.h
@@ -35,7 +35,7 @@ namespace KMime {
/** Base class for messages in mime format
- It tqcontains all the enums, static functions
+ It contains all the enums, static functions
and parser-classes, that are needed for
mime handling */
diff --git a/libkmime/kmime_header_parsing.cpp b/libkmime/kmime_header_parsing.cpp
index 6b06c9038..cf825a16a 100644
--- a/libkmime/kmime_header_parsing.cpp
+++ b/libkmime/kmime_header_parsing.cpp
@@ -19,11 +19,11 @@
In addition, as a special exception, the copyright holders give
permission to link the code of this library with any edition of
- the Qt library by Trolltech AS, Norway (or with modified versions
- of Qt that use the same license as Qt), and distribute linked
+ the TQt library by Trolltech AS, Norway (or with modified versions
+ of TQt that use the same license as TQt), and distribute linked
combinations including the two. You must obey the GNU General
Public License in all respects for all of the code used other than
- Qt. If you modify this file, you may extend this exception to
+ TQt. If you modify this file, you may extend this exception to
your version of the file, but you are not obligated to do so. If
you do not wish to do so, delete this exception statement from
your version.
@@ -207,7 +207,7 @@ bool parseEncodedWord( const char* & scursor, const char * const send,
// try if there's a (text)codec for the charset found:
bool matchOK = false;
- QTextCodec
+ TQTextCodec
*textCodec = KGlobal::charsets()->codecForName( maybeCharset, matchOK );
if ( !matchOK || !textCodec ) {
@@ -253,7 +253,7 @@ static inline void eatWhiteSpace( const char* & scursor, const char * const send
bool parseAtom( const char * & scursor, const char * const send,
TQString & result, bool allow8Bit )
{
- QPair<const char*,int> maybeResult;
+ TQPair<const char*,int> maybeResult;
if ( parseAtom( scursor, send, maybeResult, allow8Bit ) ) {
result += TQString::tqfromLatin1( maybeResult.first, maybeResult.second );
@@ -264,7 +264,7 @@ bool parseAtom( const char * & scursor, const char * const send,
}
bool parseAtom( const char * & scursor, const char * const send,
- QPair<const char*,int> & result, bool allow8Bit ) {
+ TQPair<const char*,int> & result, bool allow8Bit ) {
bool success = false;
const char * start = scursor;
@@ -293,7 +293,7 @@ bool parseAtom( const char * & scursor, const char * const send,
bool parseToken( const char * & scursor, const char * const send,
TQString & result, bool allow8Bit )
{
- QPair<const char*,int> maybeResult;
+ TQPair<const char*,int> maybeResult;
if ( parseToken( scursor, send, maybeResult, allow8Bit ) ) {
result += TQString::tqfromLatin1( maybeResult.first, maybeResult.second );
@@ -304,7 +304,7 @@ bool parseToken( const char * & scursor, const char * const send,
}
bool parseToken( const char * & scursor, const char * const send,
- QPair<const char*,int> & result, bool allow8Bit )
+ TQPair<const char*,int> & result, bool allow8Bit )
{
bool success = false;
const char * start = scursor;
@@ -466,7 +466,7 @@ bool parseComment( const char* & scursor, const char * const send,
result += cmntPart;
if ( commentNestingDepth > 1 ) // don't add the outermost ')'...
result += TQChar(')');
- maybeCmnt = TQString::null;
+ maybeCmnt = TQString();
}
afterLastClosingParenPos = scursor;
--commentNestingDepth;
@@ -527,7 +527,7 @@ bool parsePhrase( const char* & scursor, const char * const send,
}
break;
case '"': // quoted-string
- tmp = TQString::null;
+ tmp = TQString();
if ( parseGenericQuotedString( scursor, send, tmp, isCRLF, '"', '"' ) ) {
successfullyParsed = scursor;
assert( *(scursor-1) == '"' );
@@ -562,7 +562,7 @@ bool parsePhrase( const char* & scursor, const char * const send,
break;
case '(': // comment
// parse it, but ignore content:
- tmp = TQString::null;
+ tmp = TQString();
if ( parseComment( scursor, send, tmp, isCRLF,
false /*don't bother with the content*/ ) ) {
successfullyParsed = scursor;
@@ -577,7 +577,7 @@ bool parsePhrase( const char* & scursor, const char * const send,
}
break;
case '=': // encoded-word
- tmp = TQString::null;
+ tmp = TQString();
oldscursor = scursor;
lang = 0;
if ( parseEncodedWord( scursor, send, tmp, lang ) ) {
@@ -605,7 +605,7 @@ bool parsePhrase( const char* & scursor, const char * const send,
// fall though...
default: //atom
- tmp = TQString::null;
+ tmp = TQString();
scursor--;
if ( parseAtom( scursor, send, tmp, true /* allow 8bit */ ) ) {
successfullyParsed = scursor;
@@ -775,14 +775,14 @@ bool parseObsRoute( const char* & scursor, const char* const send,
// empty entry:
if ( *scursor == ',' ) {
scursor++;
- if ( save ) result.append( TQString::null );
+ if ( save ) result.append( TQString() );
continue;
}
// empty entry ending the list:
if ( *scursor == ':' ) {
scursor++;
- if ( save ) result.append( TQString::null );
+ if ( save ) result.append( TQString() );
return true;
}
@@ -834,7 +834,7 @@ bool parseAddrSpec( const char* & scursor, const char * const send,
break;
case '"': // quoted-string
- tmp = TQString::null;
+ tmp = TQString();
if ( parseGenericQuotedString( scursor, send, tmp, isCRLF, '"', '"' ) )
maybeLocalPart += tmp;
else
@@ -843,7 +843,7 @@ bool parseAddrSpec( const char* & scursor, const char * const send,
default: // atom
scursor--; // re-set scursor to point to ch again
- tmp = TQString::null;
+ tmp = TQString();
if ( parseAtom( scursor, send, tmp, false /* no 8bit */ ) )
maybeLocalPart += tmp;
else
@@ -926,7 +926,7 @@ bool parseMailbox( const char* & scursor, const char * const send,
// first, try if it's a vanilla addr-spec:
const char * oldscursor = scursor;
if ( parseAddrSpec( scursor, send, maybeAddrSpec, isCRLF ) ) {
- result.displayName = TQString::null;
+ result.displayName = TQString();
result.addrSpec = maybeAddrSpec;
return true;
}
@@ -936,7 +936,7 @@ bool parseMailbox( const char* & scursor, const char * const send,
TQString maybeDisplayName;
if ( !parsePhrase( scursor, send, maybeDisplayName, isCRLF ) ) {
// failed: reset cursor, note absent display-name
- maybeDisplayName = TQString::null;
+ maybeDisplayName = TQString();
scursor = oldscursor;
} else {
// succeeded: eat CFWS
@@ -1025,7 +1025,7 @@ bool parseAddress( const char* & scursor, const char * const send,
const char * oldscursor = scursor;
if ( parseMailbox( scursor, send, maybeMailbox, isCRLF ) ) {
// yes, it is:
- result.displayName = TQString::null;
+ result.displayName = TQString();
result.mailboxList.append( maybeMailbox );
return true;
}
@@ -1070,7 +1070,7 @@ static TQString asteriskZero = TQString::tqfromLatin1("*0*",2);
//static TQString asteriskZeroAsterisk = TQString::tqfromLatin1("*0*",3);
bool parseParameter( const char* & scursor, const char * const send,
- QPair<TQString,QStringOrQPair> & result, bool isCRLF ) {
+ TQPair<TQString,TQStringOrTQPair> & result, bool isCRLF ) {
// parameter = regular-parameter / extended-parameter
// regular-parameter = regular-parameter-name "=" value
// extended-parameter =
@@ -1104,7 +1104,7 @@ bool parseParameter( const char* & scursor, const char * const send,
"Chopping away \"*\"." << endl;
maybeAttribute.truncate( maybeAttribute.length() - 1 );
}
- result = qMakePair( maybeAttribute.lower(), QStringOrQPair() );
+ result = qMakePair( maybeAttribute.lower(), TQStringOrTQPair() );
return true;
}
@@ -1113,7 +1113,7 @@ bool parseParameter( const char* & scursor, const char * const send,
//
// parse the parameter value:
//
- QStringOrQPair maybeValue;
+ TQStringOrTQPair maybeValue;
if ( *scursor == '"' ) {
// value is a quoted-string:
scursor++;
@@ -1128,14 +1128,14 @@ bool parseParameter( const char* & scursor, const char * const send,
if ( !parseGenericQuotedString( scursor, send, maybeValue.qstring, isCRLF ) ) {
scursor = oldscursor;
- result = qMakePair( maybeAttribute.lower(), QStringOrQPair() );
+ result = qMakePair( maybeAttribute.lower(), TQStringOrTQPair() );
return false; // this case needs further processing by upper layers!!
}
} else {
// value is a token:
if ( !parseToken( scursor, send, maybeValue.qpair, false /* no 8bit */ ) ) {
scursor = oldscursor;
- result = qMakePair( maybeAttribute.lower(), QStringOrQPair() );
+ result = qMakePair( maybeAttribute.lower(), TQStringOrTQPair() );
return false; // this case needs further processing by upper layers!!
}
}
@@ -1147,7 +1147,7 @@ bool parseParameter( const char* & scursor, const char * const send,
bool parseRawParameterList( const char* & scursor, const char * const send,
- TQMap<TQString,QStringOrQPair> & result,
+ TQMap<TQString,TQStringOrTQPair> & result,
bool isCRLF ) {
// we use parseParameter() consecutively to obtain a map of raw
// attributes to raw values. "Raw" here means that we don't do
@@ -1166,7 +1166,7 @@ bool parseRawParameterList( const char* & scursor, const char * const send,
// empty list entry: ignore.
if ( *scursor == ';' ) { scursor++; continue; }
- QPair<TQString,QStringOrQPair> maybeParameter;
+ TQPair<TQString,TQStringOrTQPair> maybeParameter;
if ( !parseParameter( scursor, send, maybeParameter, isCRLF ) ) {
// we need to do a bit of work if the attribute is not
// NULL. These are the cases marked with "needs further
@@ -1201,7 +1201,7 @@ bool parseRawParameterList( const char* & scursor, const char * const send,
static void decodeRFC2231Value( Codec* & rfc2231Codec,
TQTextCodec* & textcodec,
bool isContinuation, TQString & value,
- QPair<const char*,int> & source ) {
+ TQPair<const char*,int> & source ) {
//
// parse the raw value into (charset,language,text):
@@ -1297,7 +1297,7 @@ static void decodeRFC2231Value( Codec* & rfc2231Codec,
bool parseParameterList( const char* & scursor, const char * const send,
TQMap<TQString,TQString> & result, bool isCRLF ) {
// parse the list into raw attribute-value pairs:
- TQMap<TQString,QStringOrQPair> rawParameterList;
+ TQMap<TQString,TQStringOrTQPair> rawParameterList;
if (!parseRawParameterList( scursor, send, rawParameterList, isCRLF ) )
return false;
@@ -1314,7 +1314,7 @@ bool parseParameterList( const char* & scursor, const char * const send,
TQString value;
enum Modes { NoMode = 0x0, Continued = 0x1, Encoded = 0x2 } mode;
- TQMapIterator<TQString,QStringOrQPair> it, end = rawParameterList.end();
+ TQMapIterator<TQString,TQStringOrTQPair> it, end = rawParameterList.end();
for ( it = rawParameterList.begin() ; it != end ; ++it ) {
if ( attribute.isNull() || !it.key().startsWith( attribute ) ) {
@@ -1325,7 +1325,7 @@ bool parseParameterList( const char* & scursor, const char * const send,
// store the last attribute/value pair in the result map now:
if ( !attribute.isNull() ) result.insert( attribute, value );
// and extract the information from the new raw attribute:
- value = TQString::null;
+ value = TQString();
attribute = it.key();
mode = NoMode;
// is the value encoded?
@@ -1361,7 +1361,7 @@ bool parseParameterList( const char* & scursor, const char * const send,
// save result already:
result.insert( attribute, value );
// force begin of a new attribute:
- attribute = TQString::null;
+ attribute = TQString();
}
} else /* it.key().startsWith( attribute ) */ {
//
@@ -1491,7 +1491,7 @@ static bool parseAlphaNumericTimeZone( const char* & scursor,
long int & secsEastOfGMT,
bool & timeZoneKnown )
{
- QPair<const char*,int> maybeTimeZone(0,0);
+ TQPair<const char*,int> maybeTimeZone(0,0);
if ( !parseToken( scursor, send, maybeTimeZone, false /*no 8bit*/ ) )
return false;
for ( int i = 0 ; i < timeZonesLen ; ++i )
diff --git a/libkmime/kmime_header_parsing.h b/libkmime/kmime_header_parsing.h
index 10751f034..2454c5876 100644
--- a/libkmime/kmime_header_parsing.h
+++ b/libkmime/kmime_header_parsing.h
@@ -19,11 +19,11 @@
In addition, as a special exception, the copyright holders give
permission to link the code of this library with any edition of
- the Qt library by Trolltech AS, Norway (or with modified versions
- of Qt that use the same license as Qt), and distribute linked
+ the TQt library by Trolltech AS, Norway (or with modified versions
+ of TQt that use the same license as TQt), and distribute linked
combinations including the two. You must obey the GNU General
Public License in all respects for all of the code used other than
- Qt. If you modify this file, you may extend this exception to
+ TQt. If you modify this file, you may extend this exception to
your version of the file, but you are not obligated to do so. If
you do not wish to do so, delete this exception statement from
your version.
@@ -48,10 +48,10 @@ namespace KMime {
namespace Types {
// for when we can't make up our mind what to use...
- struct KDE_EXPORT QStringOrQPair {
- QStringOrQPair() : qstring(), qpair(0,0) {}
+ struct KDE_EXPORT TQStringOrTQPair {
+ TQStringOrTQPair() : qstring(), qpair(0,0) {}
TQString qstring;
- QPair<const char*,int> qpair;
+ TQPair<const char*,int> qpair;
};
struct KDE_EXPORT AddrSpec {
@@ -94,7 +94,7 @@ namespace HeaderParsing {
to and including the encoding specifier. The
encoded-text is quite generously parsed and @p ok
is still set to @p true when e.g. the encoded-word
- appears to be truncated or tqcontains whitespace.
+ appears to be truncated or contains whitespace.
@return the decoded string the encoded word represented.
*/
bool parseEncodedWord( const char* & scursor, const char * const send,
@@ -108,13 +108,13 @@ namespace HeaderParsing {
bool parseAtom( const char* & scursor, const char * const send,
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;
+ TQPair<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,
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;
+ TQPair<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,
TQString & result, bool isCRLF,
@@ -165,13 +165,13 @@ namespace HeaderParsing {
Types::AddressList & result, bool isCRLF=false ) KDE_EXPORT;
bool parseParameter( const char* & scursor, const char * const send,
- QPair<TQString,Types::QStringOrQPair> & result,
+ TQPair<TQString,Types::TQStringOrTQPair> & result,
bool isCRLF=false ) KDE_EXPORT;
bool parseParameterList( const char* & scursor, const char * const send,
TQMap<TQString,TQString> & result, bool isCRLF=false ) KDE_EXPORT;
bool parseRawParameterList( const char* & scursor, const char * const send,
- TQMap<TQString,Types::QStringOrQPair> & result,
+ TQMap<TQString,Types::TQStringOrTQPair> & 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 cef3f7a4c..a677cdd75 100644
--- a/libkmime/kmime_headers.cpp
+++ b/libkmime/kmime_headers.cpp
@@ -199,7 +199,7 @@ bool GToken::parse( const char* & scursor, const char * const send,
// must not be empty:
if ( scursor == send ) return false;
- QPair<const char*,int> maybeToken;
+ TQPair<const char*,int> maybeToken;
if ( !parseToken( scursor, send, maybeToken, false /* no 8bit chars */ ) )
return false;
mToken = TQCString( maybeToken.first, maybeToken.second );
@@ -300,7 +300,7 @@ bool GContentType::parse( const char* & scursor, const char * const send,
// type
//
- QPair<const char*,int> maybeMimeType;
+ TQPair<const char*,int> maybeMimeType;
if ( !parseToken( scursor, send, maybeMimeType, false /* no 8Bit */ ) )
return false;
@@ -316,7 +316,7 @@ bool GContentType::parse( const char* & scursor, const char * const send,
eatCFWS( scursor, send, isCRLF );
if ( scursor == send ) return false;
- QPair<const char*,int> maybeSubType;
+ TQPair<const char*,int> maybeSubType;
if ( !parseToken( scursor, send, maybeSubType, false /* no 8bit */ ) )
return false;
@@ -357,7 +357,7 @@ bool GCISTokenWithParameterList::parse( const char* & scursor,
eatCFWS( scursor, send, isCRLF );
if ( scursor == send ) return false;
- QPair<const char*,int> maybeToken;
+ TQPair<const char*,int> maybeToken;
if ( !parseToken( scursor, send, maybeToken, false /* no 8Bit */ ) )
return false;
@@ -463,7 +463,7 @@ bool ReturnPath::parse( const char* & scursor, const char * const send, bool isC
// prepare a Null mailbox:
AddrSpec emptyAddrSpec;
- maybeMailbox.displayName = TQString::null;
+ maybeMailbox.displayName = TQString();
maybeMailbox.addrSpec = emptyAddrSpec;
} else
// check that there was no display-name:
@@ -582,9 +582,9 @@ void AddressField::from7BitString(const TQCString &s)
TQCString n;
//so what do we have here ?
- if(s.find( TQRegExp("*@*(*)", false, true) )!=-1) type=2; // From: foo@bar.com (John Doe)
- else if(s.find( TQRegExp("*<*@*>", false, true) )!=-1) type=1; // From: John Doe <foo@bar.com>
- else if(s.find( TQRegExp("*@*", false, true) )!=-1) type=0; // From: foo@bar.com
+ if(s.tqfind( TQRegExp("*@*(*)", false, true) )!=-1) type=2; // From: foo@bar.com (John Doe)
+ else if(s.tqfind( TQRegExp("*<*@*>", false, true) )!=-1) type=1; // From: John Doe <foo@bar.com>
+ else if(s.tqfind( TQRegExp("*@*", false, true) )!=-1) type=0; // From: foo@bar.com
else { //broken From header => just decode it
n_ame=decodeRFC2047String(s, &e_ncCS, defaultCS(), forceCS());
return;
@@ -598,11 +598,11 @@ void AddressField::from7BitString(const TQCString &s)
case 1:
pos1=0;
- pos2=s.find('<');
+ pos2=s.tqfind('<');
if(pos2!=-1) {
n=s.mid(pos1, pos2-pos1).stripWhiteSpace();
pos1=pos2+1;
- pos2=s.find('>', pos1);
+ pos2=s.tqfind('>', pos1);
if(pos2!=-1)
e_mail=s.mid(pos1, pos2-pos1).stripWhiteSpace();
}
@@ -611,11 +611,11 @@ void AddressField::from7BitString(const TQCString &s)
case 2:
pos1=0;
- pos2=s.find('(');
+ pos2=s.tqfind('(');
if(pos2!=-1) {
e_mail=s.mid(pos1, pos2-pos1).stripWhiteSpace();
pos1=pos2+1;
- pos2=s.find(')', pos1);
+ pos2=s.tqfind(')', pos1);
if(pos2!=-1)
n=s.mid(pos1, pos2-pos1).stripWhiteSpace();
}
@@ -664,9 +664,9 @@ void AddressField::fromUnicodeString(const TQString &s, const TQCString &cs)
e_ncCS=cachedCharset(cs);
//so what do we have here ?
- if(s.find( TQRegExp("*@*(*)", false, true) )!=-1) type=2; // From: foo@bar.com (John Doe)
- else if(s.find( TQRegExp("*<*@*>", false, true) )!=-1) type=1; // From: John Doe <foo@bar.com>
- else if(s.find( TQRegExp("*@*", false, true) )!=-1) type=0; // From: foo@bar.com
+ if(s.tqfind( TQRegExp("*@*(*)", false, true) )!=-1) type=2; // From: foo@bar.com (John Doe)
+ else if(s.tqfind( TQRegExp("*<*@*>", false, true) )!=-1) type=1; // From: John Doe <foo@bar.com>
+ else if(s.tqfind( TQRegExp("*@*", false, true) )!=-1) type=0; // From: foo@bar.com
else { //broken From header => just copy it
n_ame=s;
return;
@@ -680,11 +680,11 @@ void AddressField::fromUnicodeString(const TQString &s, const TQCString &cs)
case 1:
pos1=0;
- pos2=s.find('<');
+ pos2=s.tqfind('<');
if(pos2!=-1) {
n_ame=s.mid(pos1, pos2-pos1).stripWhiteSpace();
pos1=pos2+1;
- pos2=s.find('>', pos1);
+ pos2=s.tqfind('>', pos1);
if(pos2!=-1)
e_mail=s.mid(pos1, pos2-pos1).latin1();
}
@@ -693,11 +693,11 @@ void AddressField::fromUnicodeString(const TQString &s, const TQCString &cs)
case 2:
pos1=0;
- pos2=s.find('(');
+ pos2=s.tqfind('(');
if(pos2!=-1) {
e_mail=s.mid(pos1, pos2-pos1).stripWhiteSpace().latin1();
pos1=pos2+1;
- pos2=s.find(')', pos1);
+ pos2=s.tqfind(')', pos1);
if(pos2!=-1)
n_ame=s.mid(pos1, pos2-pos1).stripWhiteSpace();
}
@@ -831,7 +831,7 @@ void To::from7BitString(const TQCString &s)
a_ddrList->setAutoDelete(true);
}
- KQCStringSplitter split;
+ KTQCStringSplitter split;
split.init(s, ",");
bool splitOk=split.first();
if(!splitOk)
@@ -887,7 +887,7 @@ void To::fromUnicodeString(const TQString &s, const TQCString &cs)
TQString To::asUnicodeString()
{
if(!a_ddrList)
- return TQString::null;
+ return TQString();
TQString ret;
AddressField *it=a_ddrList->first();
@@ -978,7 +978,7 @@ TQCString Newsgroups::firstGroup()
{
int pos=0;
if(!g_roups.isEmpty()) {
- pos=g_roups.find(',');
+ pos=g_roups.tqfind(',');
if(pos==-1)
return g_roups;
else
@@ -1134,7 +1134,7 @@ TQCString References::at(unsigned int i)
}
if(pos1!=-1) {
- pos2=r_ef.find('>', pos1);
+ pos2=r_ef.tqfind('>', pos1);
if(pos2!=-1)
ret=r_ef.mid(pos1, pos2-pos1+1);
}
@@ -1154,7 +1154,7 @@ void References::append(const TQCString &s)
// remove bogus references
TQStringList::Iterator it = lst.begin();
while (it != lst.end()) {
- if (-1==(*it).find(exp))
+ if (-1==(*it).tqfind(exp))
it = lst.remove(it);
else
it++;
@@ -1233,7 +1233,7 @@ TQString UserAgent::asUnicodeString()
void ContentType::from7BitString(const TQCString &s)
{
- int pos=s.find(';');
+ int pos=s.tqfind(';');
if(pos==-1)
m_imeType=s.simplifyWhiteSpace();
@@ -1274,7 +1274,7 @@ TQString ContentType::asUnicodeString()
TQCString ContentType::mediaType()
{
- int pos=m_imeType.find('/');
+ int pos=m_imeType.tqfind('/');
if(pos==-1)
return m_imeType;
else
@@ -1284,7 +1284,7 @@ TQCString ContentType::mediaType()
TQCString ContentType::subType()
{
- int pos=m_imeType.find('/');
+ int pos=m_imeType.tqfind('/');
if(pos==-1)
return TQCString();
else
@@ -1453,9 +1453,9 @@ TQCString ContentType::getParameter(const char *name)
{
TQCString ret;
int pos1=0, pos2=0;
- pos1=p_arams.find(name, 0, false);
+ pos1=p_arams.tqfind(name, 0, false);
if(pos1!=-1) {
- if( (pos2=p_arams.find(';', pos1))==-1 )
+ if( (pos2=p_arams.tqfind(';', pos1))==-1 )
pos2=p_arams.length();
pos1+=strlen(name)+1;
ret=p_arams.mid(pos1, pos2-pos1);
@@ -1475,12 +1475,12 @@ void ContentType::setParameter(const TQCString &name, const TQCString &value, bo
else
param=name+"="+value;
- pos1=p_arams.find(name, 0, false);
+ pos1=p_arams.tqfind(name, 0, false);
if(pos1==-1) {
p_arams+="; "+param;
}
else {
- pos2=p_arams.find(';', pos1);
+ pos2=p_arams.tqfind(';', pos1);
if(pos2==-1)
pos2=p_arams.length();
p_arams.remove(pos1, pos2-pos1);
@@ -1559,7 +1559,7 @@ void CDisposition::from7BitString(const TQCString &s)
d_isp=CDattachment;
else d_isp=CDinline;
- int pos=s.find("filename=", 0, false);
+ int pos=s.tqfind("filename=", 0, false);
TQCString fn;
if(pos>-1) {
pos+=9;
@@ -1602,7 +1602,7 @@ void CDisposition::fromUnicodeString(const TQString &s, const TQCString &cs)
d_isp=CDattachment;
else d_isp=CDinline;
- int pos=s.find("filename=", 0, false);
+ int pos=s.tqfind("filename=", 0, false);
if(pos>-1) {
pos+=9;
f_ilename=s.mid(pos, s.length()-pos);
diff --git a/libkmime/kmime_headers.h b/libkmime/kmime_headers.h
index 1c980a040..40ae18b8a 100644
--- a/libkmime/kmime_headers.h
+++ b/libkmime/kmime_headers.h
@@ -116,16 +116,16 @@ class KDE_EXPORT Base {
/** Create an empty header. */
Base() : e_ncCS(0), p_arent(0) {}
- /** Create an empty header with a parent-content. */
- Base(KMime::Content *parent) : e_ncCS(0), p_arent(parent) {}
+ /** Create an empty header with a tqparent-content. */
+ Base(KMime::Content *tqparent) : e_ncCS(0), p_arent(tqparent) {}
/** Destructor */
virtual ~Base() {}
- /** Return the parent of this header. */
- KMime::Content* parent() { return p_arent; }
+ /** Return the tqparent of this header. */
+ KMime::Content* tqparent() { return p_arent; }
- /** Set the parent for this header. */
+ /** Set the tqparent for this header. */
void setParent(KMime::Content *p) { p_arent=p; }
/** Parse the given string. Take care of RFC2047-encoded
@@ -239,7 +239,7 @@ private:
};
/** This is the base class for all structured header fields. It
- tqcontains parsing methods for all basic token types found in
+ contains parsing methods for all basic token types found in
rfc2822.
@section Parsing
@@ -283,10 +283,10 @@ protected:
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 );
+ const TQPair<const char*,int> & 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 );
+ const TQPair<const char*int> & input );
bool writeGenericQuotedString( char* & dcursor, const char * const dend,
const TQString & input, bool withCRLF=false );
@@ -605,7 +605,7 @@ class KDE_EXPORT Subject : public Generics::GUnstructured {
virtual const char* type() { return "Subject"; }
bool isReply() {
- return ( asUnicodeString().find( TQString("Re:"), 0, false ) == 0 );
+ return ( asUnicodeString().tqfind( TQString("Re:"), 0, false ) == 0 );
}
};
@@ -651,7 +651,7 @@ class KDE_EXPORT Control : public Base {
virtual bool isEmpty() { return (c_trlMsg.isEmpty()); }
virtual const char* type() { return "Control"; }
- bool isCancel() { return (c_trlMsg.find("cancel", 0, false)!=-1); }
+ bool isCancel() { return (c_trlMsg.tqfind("cancel", 0, false)!=-1); }
protected:
TQCString c_trlMsg;
@@ -708,7 +708,7 @@ class KDE_EXPORT Newsgroups : public Base {
virtual const char* type() { return "Newsgroups"; }
TQCString firstGroup();
- bool isCrossposted() { return ( g_roups.find(',')>-1 ); }
+ bool isCrossposted() { return ( g_roups.tqfind(',')>-1 ); }
TQStringList getGroups();
protected:
@@ -813,7 +813,7 @@ class HeaderFactory : public TQAsciiDict<headerCreator>
private:
HeaderFactory();
~HeaderFactory() {}
- static QAsciiDict
+ static TQAsciiDict
public:
/** Create a new header object of type @p aType, or a fitting
diff --git a/libkmime/kmime_mdn.cpp b/libkmime/kmime_mdn.cpp
index 702f5f811..9d654bc78 100644
--- a/libkmime/kmime_mdn.cpp
+++ b/libkmime/kmime_mdn.cpp
@@ -19,11 +19,11 @@
In addition, as a special exception, the copyright holders give
permission to link the code of this library with any edition of
- the Qt library by Trolltech AS, Norway (or with modified versions
- of Qt that use the same license as Qt), and distribute linked
+ the TQt library by Trolltech AS, Norway (or with modified versions
+ of TQt that use the same license as TQt), and distribute linked
combinations including the two. You must obey the GNU General
Public License in all respects for all of the code used other than
- Qt. If you modify this file, you may extend this exception to
+ TQt. If you modify this file, you may extend this exception to
your version of the file, but you are not obligated to do so. If
you do not wish to do so, delete this exception statement from
your version.
@@ -255,7 +255,7 @@ namespace MDN {
return i18n( dispositionTypes[i].description );
kdWarning() << "KMime::MDN::descriptionFor(): No such disposition type: "
<< (int)d << endl;
- return TQString::null;
+ return TQString();
}
} // namespace MDN
diff --git a/libkmime/kmime_mdn.h b/libkmime/kmime_mdn.h
index 3f207e312..bc1a65aa4 100644
--- a/libkmime/kmime_mdn.h
+++ b/libkmime/kmime_mdn.h
@@ -19,11 +19,11 @@
In addition, as a special exception, the copyright holders give
permission to link the code of this library with any edition of
- the Qt library by Trolltech AS, Norway (or with modified versions
- of Qt that use the same license as Qt), and distribute linked
+ the TQt library by Trolltech AS, Norway (or with modified versions
+ of TQt that use the same license as TQt), and distribute linked
combinations including the two. You must obey the GNU General
Public License in all respects for all of the code used other than
- Qt. If you modify this file, you may extend this exception to
+ TQt. If you modify this file, you may extend this exception to
your version of the file, but you are not obligated to do so. If
you do not wish to do so, delete this exception statement from
your version.
@@ -186,7 +186,7 @@ namespace KMime {
SendingMode sendingMode,
const TQValueList<DispositionModifier> & dispositionModifers
=TQValueList<DispositionModifier>(),
- const TQString & special=TQString::null );
+ const TQString & special=TQString() );
KDE_EXPORT extern TQString descriptionFor( DispositionType d,
const TQValueList<DispositionModifier> & m
diff --git a/libkmime/kmime_message.cpp b/libkmime/kmime_message.cpp
index 0d516ecc7..a7ce3ca8a 100644
--- a/libkmime/kmime_message.cpp
+++ b/libkmime/kmime_message.cpp
@@ -96,7 +96,7 @@ void Message::assemble()
newHead+=contentTransferEncoding()->as7BitString()+"\n";
//X-Headers
- int pos=h_ead.find("\nX-");
+ int pos=h_ead.tqfind("\nX-");
if(pos>-1) //we already have some x-headers => "recycle" them
newHead+=h_ead.mid(pos+1, h_ead.length()-pos-1);
else if(h_eaders && !h_eaders->isEmpty()) {
diff --git a/libkmime/kmime_newsarticle.cpp b/libkmime/kmime_newsarticle.cpp
index 1b16ad71f..8989f6a07 100644
--- a/libkmime/kmime_newsarticle.cpp
+++ b/libkmime/kmime_newsarticle.cpp
@@ -104,7 +104,7 @@ void NewsArticle::assemble()
newHead+=contentTransferEncoding()->as7BitString()+"\n";
//X-Headers
- int pos=h_ead.find("\nX-");
+ int pos=h_ead.tqfind("\nX-");
if(pos>-1) //we already have some x-headers => "recycle" them
newHead+=h_ead.mid(pos+1, h_ead.length()-pos);
else if(h_eaders && !h_eaders->isEmpty()) {
diff --git a/libkmime/kmime_parsers.cpp b/libkmime/kmime_parsers.cpp
index 446f1af7c..c9dc1e3d1 100644
--- a/libkmime/kmime_parsers.cpp
+++ b/libkmime/kmime_parsers.cpp
@@ -39,7 +39,7 @@ bool MultiPart::parse()
//find the first valid boundary
while(1) {
- if( (pos1=s_rc.find(b, pos1))==-1 || pos1==0 || s_rc[pos1-1]=='\n' ) //valid boundary found or no boundary at all
+ if( (pos1=s_rc.tqfind(b, pos1))==-1 || pos1==0 || s_rc[pos1-1]=='\n' ) //valid boundary found or no boundary at all
break;
pos1+=blen; //boundary found but not valid => skip it;
}
@@ -56,11 +56,11 @@ bool MultiPart::parse()
while(pos1>-1 && pos2>-1) {
//skip the rest of the line for the first boundary - the message-part starts here
- if( (pos1=s_rc.find('\n', pos1))>-1 ) { //now search the next linebreak
+ if( (pos1=s_rc.tqfind('\n', pos1))>-1 ) { //now search the next linebreak
//now find the next valid boundary
pos2=++pos1; //pos1 and pos2 point now to the beginning of the next line after the boundary
while(1) {
- if( (pos2=s_rc.find(b, pos2))==-1 || s_rc[pos2-1]=='\n' ) //valid boundary or no more boundaries found
+ if( (pos2=s_rc.tqfind(b, pos2))==-1 || s_rc[pos2-1]=='\n' ) //valid boundary or no more boundaries found
break;
pos2+=blen; //boundary is invalid => skip it;
}
@@ -77,7 +77,7 @@ bool MultiPart::parse()
pos2+=blen; //pos2 points now to the first charakter after the boundary
if(s_rc[pos2]=='-' && s_rc[pos2+1]=='-') { //end-boundary
pos1=pos2+2; //pos1 points now to the character directly after the end-boundary
- if( (pos1=s_rc.find('\n', pos1))>-1 ) //skipt the rest of this line
+ if( (pos1=s_rc.tqfind('\n', pos1))>-1 ) //skipt the rest of this line
e_pilouge=s_rc.mid(pos1+1, s_rc.length()-pos1-1); //everything after the end-boundary is considered as the epilouge
pos1=-1;
pos2=-1; //break
@@ -149,12 +149,12 @@ bool UUEncoded::parse()
while (success) {
int beginPos=currentPos, uuStart=currentPos, endPos=0, lineCount=0, MCount=0, pos=0, len=0;
- bool tqcontainsBegin=false, tqcontainsEnd=false;
+ bool containsBegin=false, containsEnd=false;
TQCString tmp,fileName;
- if( (beginPos=s_rc.find(TQRegExp("begin [0-9][0-9][0-9]"),currentPos))>-1 && (beginPos==0 || s_rc.at(beginPos-1)=='\n') ) {
- tqcontainsBegin=true;
- uuStart=s_rc.find('\n', beginPos);
+ if( (beginPos=s_rc.tqfind(TQRegExp("begin [0-9][0-9][0-9]"),currentPos))>-1 && (beginPos==0 || s_rc.at(beginPos-1)=='\n') ) {
+ containsBegin=true;
+ uuStart=s_rc.tqfind('\n', beginPos);
if(uuStart==-1) {//no more line breaks found, we give up
success = false;
break;
@@ -163,12 +163,12 @@ bool UUEncoded::parse()
}
else beginPos=currentPos;
- if ( (endPos=s_rc.find("\nend",(uuStart>0)? uuStart-1:0))==-1 )
+ if ( (endPos=s_rc.tqfind("\nend",(uuStart>0)? uuStart-1:0))==-1 )
endPos=s_rc.length(); //no end found
else
- tqcontainsEnd=true;
+ containsEnd=true;
- if ((tqcontainsBegin && tqcontainsEnd) || firstIteration) {
+ if ((containsBegin && containsEnd) || firstIteration) {
//printf("beginPos=%d , uuStart=%d , endPos=%d\n", beginPos, uuStart, endPos);
//all lines in a uuencoded text start with 'M'
@@ -183,18 +183,18 @@ bool UUEncoded::parse()
//printf("lineCount=%d , MCount=%d\n", lineCount, MCount);
if( MCount==0 || (lineCount-MCount)>10 ||
- ((!tqcontainsBegin || !tqcontainsEnd) && (MCount<15)) ) { // harder check for splitted-articles
+ ((!containsBegin || !containsEnd) && (MCount<15)) ) { // harder check for splitted-articles
success = false;
break; //too many "non-M-Lines" found, we give up
}
- if( (!tqcontainsBegin || !tqcontainsEnd) && s_ubject) { // message may be split up => parse subject
+ if( (!containsBegin || !containsEnd) && s_ubject) { // message may be split up => parse subject
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);
- pos=tmp.find('/');
+ pos=tmp.tqfind('/');
p_artNr=tmp.left(pos).toInt();
t_otalNr=tmp.right(tmp.length()-pos-1).toInt();
} else {
@@ -207,7 +207,7 @@ bool UUEncoded::parse()
if(beginPos>0)
t_ext.append(s_rc.mid(currentPos,beginPos-currentPos));
- if(tqcontainsBegin)
+ if(containsBegin)
fileName = s_rc.mid(beginPos+10, uuStart-beginPos-11); //everything between "begin ### " and the next LF is considered as the filename
else
fileName = "";
@@ -216,7 +216,7 @@ bool UUEncoded::parse()
m_imeTypes.append(guessMimeType(fileName));
firstIteration=false;
- int next = s_rc.find('\n', endPos+1);
+ int next = s_rc.tqfind('\n', endPos+1);
if(next==-1) { //no more line breaks found, we give up
success = false;
break;
@@ -249,12 +249,12 @@ bool YENCEncoded::yencMeta(TQCString& src, const TQCString& name, int* value)
bool found = false;
TQCString sought=name + "=";
- int iPos=src.find( sought);
+ int iPos=src.tqfind( sought);
if (iPos>-1) {
- int pos1=src.find(' ', iPos);
- int pos2=src.find('\r', iPos);
- int pos3=src.find('\t', iPos);
- int pos4=src.find('\n', iPos);
+ int pos1=src.tqfind(' ', iPos);
+ int pos2=src.tqfind('\r', iPos);
+ int pos3=src.tqfind('\t', iPos);
+ int pos4=src.tqfind('\n', iPos);
if (pos2>=0 && (pos1<0 || pos1>pos2))
pos1=pos2;
if (pos3>=0 && (pos1<0 || pos1>pos3))
@@ -281,19 +281,19 @@ bool YENCEncoded::parse()
while (success) {
int beginPos=currentPos, yencStart=currentPos;
- bool tqcontainsPart=false;
+ bool containsPart=false;
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);
+ if ((beginPos=s_rc.tqfind("=ybegin ", currentPos))>-1 && ( beginPos==0 || s_rc.at( beginPos-1)=='\n') ) {
+ yencStart=s_rc.tqfind( '\n', beginPos);
if (yencStart==-1) { // no more line breaks found, give up
success = false;
break;
} else {
yencStart++;
- if (s_rc.find("=ypart", yencStart)==yencStart) {
- tqcontainsPart=true;
- yencStart=s_rc.find( '\n', yencStart);
+ if (s_rc.tqfind("=ypart", yencStart)==yencStart) {
+ containsPart=true;
+ yencStart=s_rc.tqfind( '\n', yencStart);
if ( yencStart== -1) {
success=false;
break;
@@ -305,14 +305,14 @@ bool YENCEncoded::parse()
// Filenames can contain any embedded chars until end of line
TQCString meta=s_rc.mid(beginPos, yencStart-beginPos);
- int namePos=meta.find("name=");
+ int namePos=meta.tqfind("name=");
if (namePos== -1) {
success=false;
break;
}
- int eolPos=meta.find('\r', namePos);
+ int eolPos=meta.tqfind('\r', namePos);
if (eolPos== -1)
- eolPos=meta.find('\n', namePos);
+ eolPos=meta.tqfind('\n', namePos);
if (eolPos== -1) {
success=false;
break;
@@ -332,7 +332,7 @@ bool YENCEncoded::parse()
}
int partBegin, partEnd;
- if (tqcontainsPart) {
+ if (containsPart) {
if (!yencMeta(meta, "part", &p_artNr)) {
success=false;
break;
@@ -355,7 +355,7 @@ bool YENCEncoded::parse()
int len=s_rc.length();
bool lineStart=true;
int lineLength=0;
- bool tqcontainsEnd=false;
+ bool containsEnd=false;
TQByteArray binary = TQByteArray(yencSize);
while (pos<len) {
int ch=s_rc.at(pos);
@@ -382,7 +382,7 @@ bool YENCEncoded::parse()
ch=s_rc.at( pos+1);
if (lineStart && ch=='y')
{
- tqcontainsEnd=true;
+ containsEnd=true;
break;
}
pos+=2;
@@ -412,7 +412,7 @@ bool YENCEncoded::parse()
}
}
- if (!tqcontainsEnd)
+ if (!containsEnd)
{
success=false;
break;
@@ -424,7 +424,7 @@ bool YENCEncoded::parse()
}
// pos now points to =yend; get end data
- eolPos=s_rc.find('\n', pos);
+ eolPos=s_rc.tqfind('\n', pos);
if (eolPos== -1)
{
success=false;
diff --git a/libkmime/kmime_util.cpp b/libkmime/kmime_util.cpp
index 2f0d04a1f..167ac78d7 100644
--- a/libkmime/kmime_util.cpp
+++ b/libkmime/kmime_util.cpp
@@ -30,7 +30,7 @@
#endif
#include <tqtextcodec.h>
-#include <tqstrlist.h> // for QStrIList
+#include <tqstrlist.h> // for TQStrIList
#include <tqregexp.h>
#include <stdlib.h>
@@ -47,7 +47,7 @@ TQStrIList l_anguageCache;
const char* cachedCharset(const TQCString &name)
{
- int idx=c_harsetCache.find(name.data());
+ int idx=c_harsetCache.tqfind(name.data());
if(idx>-1)
return c_harsetCache.at(idx);
@@ -58,7 +58,7 @@ const char* cachedCharset(const TQCString &name)
const char* cachedLanguage(const TQCString &name)
{
- int idx=l_anguageCache.find(name.data());
+ int idx=l_anguageCache.tqfind(name.data());
if(idx>-1)
return l_anguageCache.at(idx);
@@ -132,7 +132,7 @@ TQString decodeRFC2047String(const TQCString &src, const char **usedCS,
const int maxLen=400;
int i;
- if(src.find("=?") < 0)
+ if(src.tqfind("=?") < 0)
result = src.copy();
else {
result.truncate(src.length());
@@ -217,7 +217,7 @@ TQString decodeRFC2047String(const TQCString &src, const char **usedCS,
*dest = '\0';
}
- //find suitable QTextCodec
+ //find suitable TQTextCodec
TQTextCodec *codec=0;
bool ok=true;
if (forceCS || declaredCS.isEmpty()) {
@@ -248,7 +248,7 @@ TQCString encodeRFC2047String(const TQString &src, const char *charset,
{
TQCString encoded8Bit, result, usedCS;
unsigned int start=0,end=0;
- bool nonAscii=false, ok=true, useQEncoding=false;
+ bool nonAscii=false, ok=true, useTQEncoding=false;
TQTextCodec *codec=0;
usedCS=charset;
@@ -260,8 +260,8 @@ TQCString encodeRFC2047String(const TQString &src, const char *charset,
codec=KGlobal::charsets()->codecForName(usedCS, ok);
}
- if (usedCS.find("8859-")>=0) // use "B"-Encoding for non iso-8859-x charsets
- useQEncoding=true;
+ if (usedCS.tqfind("8859-")>=0) // use "B"-Encoding for non iso-8859-x charsets
+ useTQEncoding=true;
encoded8Bit=codec->fromUnicode(src);
@@ -297,7 +297,7 @@ TQCString encodeRFC2047String(const TQString &src, const char *charset,
result = encoded8Bit.left(start)+"=?"+usedCS;
- if (useQEncoding) {
+ if (useTQEncoding) {
result += "?Q?";
char c,hexcode; // implementation of the "Q"-encoding described in RFC 2047
@@ -335,7 +335,7 @@ TQCString encodeRFC2047String(const TQString &src, const char *charset,
TQCString uniqueString()
{
- static char chars[] = "0123456789abcdefghijklmnopqrstuvxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
+ static char chars[] = "0123456789abcdefghijklmnopqrstuvxyzABCDEFGHIJKLMNOPTQRSTUVWXYZ";
time_t now;
TQCString ret;
char p[11];
@@ -375,7 +375,7 @@ TQCString extractHeader(const TQCString &src, const char *name)
pos1 = 0;
} else {
n.prepend("\n");
- pos1 = src.find(n,0,false);
+ pos1 = src.tqfind(n,0,false);
}
if (pos1>-1) { //there is a header with the given name
@@ -387,7 +387,7 @@ TQCString extractHeader(const TQCString &src, const char *name)
if (src[pos2]!='\n') { // check if the header is not empty
while(1) {
- pos2=src.find("\n", pos2+1);
+ pos2=src.tqfind("\n", pos2+1);
if(pos2==-1 || pos2==len || ( src[pos2+1]!=' ' && src[pos2+1]!='\t') ) //break if we reach the end of the string, honor folded lines
break;
else
@@ -506,7 +506,7 @@ DateFormatter::setFormat( FormatType t )
mFormat = t;
}
-QString
+TQString
DateFormatter::dateString( time_t otime , const TQString& lang ,
bool shortFormat, bool includeSecs ) const
{
@@ -527,17 +527,17 @@ DateFormatter::dateString( time_t otime , const TQString& lang ,
return custom( otime );
break;
}
- return TQString::null;
+ return TQString();
}
-QString
+TQString
DateFormatter::dateString(const TQDateTime& dtime, const TQString& lang,
bool shortFormat, bool includeSecs ) const
{
return DateFormatter::dateString( qdateToTimeT(dtime), lang, shortFormat, includeSecs );
}
-QCString
+TQCString
DateFormatter::rfc2822(time_t otime) const
{
TQDateTime tmp;
@@ -551,13 +551,13 @@ DateFormatter::rfc2822(time_t otime) const
return ret;
}
-QString
+TQString
DateFormatter::custom(time_t t) const
{
if ( mCustomFormat.isEmpty() )
- return TQString::null;
+ return TQString();
- int z = mCustomFormat.find("Z");
+ int z = mCustomFormat.tqfind("Z");
TQDateTime d;
TQString ret = mCustomFormat;
@@ -578,14 +578,14 @@ DateFormatter::setCustomFormat(const TQString& format)
mFormat = Custom;
}
-QString
+TQString
DateFormatter::getCustomFormat() const
{
return mCustomFormat;
}
-QCString
+TQCString
DateFormatter::zone(time_t otime) const
{
TQCString ret;
@@ -658,7 +658,7 @@ DateFormatter::qdateToTimeT(const TQDateTime& dt) const
return drf;
}
-QString
+TQString
DateFormatter::fancy(time_t otime) const
{
KLocale *locale = KGlobal::locale();
@@ -710,7 +710,7 @@ DateFormatter::fancy(time_t otime) const
}
-QString
+TQString
DateFormatter::localized(time_t otime, bool shortFormat, bool includeSecs,
const TQString& localeLanguage ) const
{
@@ -734,13 +734,13 @@ DateFormatter::localized(time_t otime, bool shortFormat, bool includeSecs,
return ret;
}
-QString
+TQString
DateFormatter::cTime(time_t otime) const
{
return TQString::tqfromLatin1( ctime( &otime ) ).stripWhiteSpace() ;
}
-QString
+TQString
DateFormatter::isoDate(time_t otime) const
{
char cstr[64];
@@ -755,7 +755,7 @@ DateFormatter::reset()
mCurrentTime = 0;
}
-QString
+TQString
DateFormatter::formatDate(DateFormatter::FormatType t, time_t otime,
const TQString& data, bool shortFormat, bool includeSecs )
{
@@ -766,7 +766,7 @@ DateFormatter::formatDate(DateFormatter::FormatType t, time_t otime,
return f.dateString( otime, data, shortFormat, includeSecs );
}
-QString
+TQString
DateFormatter::formatCurrentDate( DateFormatter::FormatType t, const TQString& data,
bool shortFormat, bool includeSecs )
{
@@ -777,7 +777,7 @@ DateFormatter::formatCurrentDate( DateFormatter::FormatType t, const TQString& d
return f.dateString( time(0), data, shortFormat, includeSecs );
}
-QCString
+TQCString
DateFormatter::rfc2822FormatDate( time_t t )
{
DateFormatter f;
diff --git a/libkmime/kmime_util.h b/libkmime/kmime_util.h
index 3c710ab72..2cfe135ac 100644
--- a/libkmime/kmime_util.h
+++ b/libkmime/kmime_util.h
@@ -35,7 +35,7 @@ namespace KMime {
keeping strings in a common repository.*/
extern const char* cachedLanguage(const TQCString &name) KDE_EXPORT;
- /** checks whether @p s tqcontains any non-us-ascii characters */
+ /** checks whether @p s contains any non-us-ascii characters */
extern bool isUsAscii(const TQString &s) KDE_EXPORT;
inline bool isOfSet(const uchar map[16], unsigned char ch) {
@@ -154,20 +154,20 @@ namespace KMime {
*/
extern TQCString LFtoCRLF(const TQCString &s) KDE_EXPORT;
- /** Removes quote (DQUOTE) characters and decodes "quoted-pairs"
+ /** Removes quote (DTQUOTE) characters and decodes "quoted-pairs"
(ie. backslash-escaped characters)
@param str the string to work on.
@see addQuotes
*/
KDE_EXPORT extern void removeQuots(TQCString &str);
- /** Removes quote (DQUOTE) characters and decodes "quoted-pairs"
+ /** Removes quote (DTQUOTE) characters and decodes "quoted-pairs"
(ie. backslash-escaped characters)
@param str the string to work on.
@see addQuotes
*/
KDE_EXPORT extern void removeQuots(TQString &str);
/** Converts the given string into a quoted-string if
- the string tqcontains any special characters
+ 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.
@@ -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
*/
- TQString dateString(time_t otime, const TQString& lang = TQString::null,
+ TQString dateString(time_t otime, const TQString& lang = TQString(),
bool shortFormat = true, bool includeSecs=false) const;
/**
* overloaded, does exactly what #dateString does (it's slower)
*/
- TQString dateString(const TQDateTime& dtime, const TQString& lang = TQString::null,
+ TQString dateString(const TQDateTime& dtime, const TQString& lang = TQString(),
bool shortFormat = true, bool includeSecs=false) const;
@@ -267,7 +267,7 @@ namespace KMime {
* @param includeSecs used <em>only</em> by the Localized format, is passed to KLocale::formatDateTime
*/
static TQString formatDate( DateFormatter::FormatType t, time_t time,
- const TQString& data = TQString::null,
+ const TQString& data = TQString(),
bool shortFormat = true, bool includeSecs=false);
/** convenience function, same as #formatDate
@@ -279,7 +279,7 @@ namespace KMime {
* @param includeSecs used <em>only</em> by the Localized format, is passed to KLocale::formatDateTime
*/
static TQString formatCurrentDate( DateFormatter::FormatType t,
- const TQString& data = TQString::null,
+ const TQString& data = TQString(),
bool shortFormat = true, bool includeSecs=false);
/** convenience function, same as #rfc2822 */
@@ -301,7 +301,7 @@ namespace KMime {
* @internal
*/
TQString localized(time_t otime, bool shortFormat = true, bool includeSecs = false,
- const TQString& localeLanguage=TQString::null ) const;
+ const TQString& localeLanguage=TQString() ) const;
/**
* returns string as formatted with ctime function
* @internal
diff --git a/libkmime/kqcstringsplitter.cpp b/libkmime/kqcstringsplitter.cpp
index 2038f4f25..4f8263133 100644
--- a/libkmime/kqcstringsplitter.cpp
+++ b/libkmime/kqcstringsplitter.cpp
@@ -16,7 +16,7 @@
#include "kqcstringsplitter.h"
-KQCStringSplitter::KQCStringSplitter()
+KTQCStringSplitter::KTQCStringSplitter()
{
reset();
}
@@ -24,13 +24,13 @@ KQCStringSplitter::KQCStringSplitter()
-KQCStringSplitter::~KQCStringSplitter()
+KTQCStringSplitter::~KTQCStringSplitter()
{
}
-void KQCStringSplitter::init(const TQCString &str, const char *s)
+void KTQCStringSplitter::init(const TQCString &str, const char *s)
{
sep=s;
src=str;
@@ -38,13 +38,13 @@ void KQCStringSplitter::init(const TQCString &str, const char *s)
-void KQCStringSplitter::init(const char *str, const char *s)
+void KTQCStringSplitter::init(const char *str, const char *s)
{
sep=s;
src=str;
}
-bool KQCStringSplitter::first()
+bool KTQCStringSplitter::first()
{
/*int plus;
if(incSep) plus=sep.length();
@@ -52,7 +52,7 @@ bool KQCStringSplitter::first()
start=0;
- end=src.find(sep, start);
+ end=src.tqfind(sep, start);
if(end!=-1) {
dst=src.mid(start, end);
@@ -68,7 +68,7 @@ bool KQCStringSplitter::first()
-bool KQCStringSplitter::last()
+bool KTQCStringSplitter::last()
{
/*int startplus, endplus;
@@ -96,7 +96,7 @@ bool KQCStringSplitter::last()
-bool KQCStringSplitter::next()
+bool KTQCStringSplitter::next()
{
/*int plus;
if(incSep) plus=sep.length();
@@ -106,7 +106,7 @@ bool KQCStringSplitter::next()
if(start< (int) src.length()) {
- end=src.find(sep, start);
+ end=src.tqfind(sep, start);
if(end!=-1) {
dst=src.mid(start, end-start);
@@ -125,7 +125,7 @@ bool KQCStringSplitter::next()
-bool KQCStringSplitter::prev()
+bool KTQCStringSplitter::prev()
{
/*int startplus, endplus;
diff --git a/libkmime/kqcstringsplitter.h b/libkmime/kqcstringsplitter.h
index 7e3c4dd0b..652ec633f 100644
--- a/libkmime/kqcstringsplitter.h
+++ b/libkmime/kqcstringsplitter.h
@@ -14,18 +14,18 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
*/
-#ifndef KQCSTRINGSPLITTER_H
-#define KQCSTRINGSPLITTER_H
+#ifndef KTQCSTRINGSPLITTER_H
+#define KTQCSTRINGSPLITTER_H
#include <tqcstring.h>
#include <kdepimmacros.h>
-class KDE_EXPORT KQCStringSplitter {
+class KDE_EXPORT KTQCStringSplitter {
public:
- KQCStringSplitter();
- ~KQCStringSplitter();
+ KTQCStringSplitter();
+ ~KTQCStringSplitter();
void reset() { start=0; end=0; sep=""; incSep=false;}
diff --git a/libkmime/tests/run_codec_tests b/libkmime/tests/run_codec_tests
index 62908eeec..62f5f2d60 100755
--- a/libkmime/tests/run_codec_tests
+++ b/libkmime/tests/run_codec_tests
@@ -19,7 +19,7 @@ failedTests=0
# loop over all .expected files in the directory
# specified by the single argument:
-for i in $(find "$@" -type f -name '*.expected'); do
+for i in $(tqfind "$@" -type f -name '*.expected'); do
dirName="$(dirname "$i")"
if [ "$dirName" != "$oldDirName" ]; then
oldDirName="$dirName"
diff --git a/libkmime/tests/test_charfreq.cpp b/libkmime/tests/test_charfreq.cpp
index 50f2809d8..04f58bc01 100644
--- a/libkmime/tests/test_charfreq.cpp
+++ b/libkmime/tests/test_charfreq.cpp
@@ -1,5 +1,5 @@
// test program for KMime::CharFreq.
-// compile with g++ -I$QTDIR/include -L$QTDIR/lib -lqt(-mt) \
+// compile with g++ -I$TQTDIR/include -L$TQTDIR/lib -lqt(-mt) \
// -o test_charfreq test_charfreq.cpp
#include "../kmime_charfreq.cpp"
diff --git a/libkmime/tests/test_kmime_codec.cpp b/libkmime/tests/test_kmime_codec.cpp
index 68ab08ec7..f27bc5b9b 100644
--- a/libkmime/tests/test_kmime_codec.cpp
+++ b/libkmime/tests/test_kmime_codec.cpp
@@ -1,7 +1,7 @@
/* test program for KMime::Codec's:
compile with:
- g++ -I$QTDIR/include -I$KDEDIR/include -L$QTDIR/lib -L$KDEDIR/lib \
- -lqt-mt -lkdecore -lkdenetwork -O2 -pthread -DQT_THREAD_SUPPORT \
+ g++ -I$TQTDIR/include -I$KDEDIR/include -L$TQTDIR/lib -L$KDEDIR/lib \
+ -lqt-mt -lkdecore -lkdenetwork -O2 -pthread -DTQT_THREAD_SUPPORT \
-o test_kmime_codec{,.cpp}
*/
@@ -25,7 +25,7 @@
#include <cassert>
#include <tqfile.h>
-#include <tqcstring.h> // QByteArray
+#include <tqcstring.h> // TQByteArray
using namespace KMime;
using namespace std;
@@ -72,7 +72,7 @@ void missingParameterTo( const char * option ) {
usage();
}
-static enum { Kio = 0, ChunkWise = 1, ConvenienceQBA = 3 }
+static enum { Kio = 0, ChunkWise = 1, ConvenienceTQBA = 3 }
pattern = ChunkWise;
static int outbufsize = 4096;
static int inbufsize = -1; // whole file
@@ -143,7 +143,7 @@ int main( int argc, char * argv[] ) {
else if ( !qstricmp( "chunkwise", optarg ) )
pattern = ChunkWise;
else if ( !qstricmp( "convenience-qba", optarg ) )
- pattern = ConvenienceQBA;
+ pattern = ConvenienceTQBA;
else {
cerr << "Unknown usage pattern \"" << optarg << "\"" << endl;
usage();
@@ -218,7 +218,7 @@ int main( int argc, char * argv[] ) {
case Kio:
encode_decode_kio( encode, codec, infile_buffer, outfile );
break;
- case ConvenienceQBA:
+ case ConvenienceTQBA:
encode_decode_convenience_qba( encode, codec, infile_buffer, outfile );
break;
default:
@@ -371,7 +371,7 @@ void encode_decode_chunkwise( bool encode, const Codec * codec,
//
uint offset = 0;
while ( offset < infile_buffer.size() ) {
- uint reallyRead = QMIN( indata.size(), infile_buffer.size() - offset );
+ uint reallyRead = TQMIN( indata.size(), infile_buffer.size() - offset );
indata.duplicate( infile_buffer.begin() + offset, reallyRead );
offset += reallyRead;
diff --git a/libkmime/tests/test_kmime_header_parsing.cpp b/libkmime/tests/test_kmime_header_parsing.cpp
index 93c447ebd..7c93ec108 100644
--- a/libkmime/tests/test_kmime_header_parsing.cpp
+++ b/libkmime/tests/test_kmime_header_parsing.cpp
@@ -350,7 +350,7 @@ int main( int argc, char * argv[] ) {
break;
case 16:
{ // parameter
- QPair<TQString,KMime::Types::QStringOrQPair> result;
+ TQPair<TQString,KMime::Types::TQStringOrTQPair> result;
bool ok = parseParameter( iit, iend, result, withCRLF );
cout << ( ok ? "OK" : "BAD" ) << endl
@@ -363,13 +363,13 @@ int main( int argc, char * argv[] ) {
break;
case 17:
{ // raw-parameter-list
- TQMap<TQString,KMime::Types::QStringOrQPair> result;
+ TQMap<TQString,KMime::Types::TQStringOrTQPair> result;
bool ok = parseRawParameterList( iit, iend, result, withCRLF );
cout << ( ok ? "OK" : "BAD" ) << endl
<< "result: " << result.count() << " raw parameters:" << endl;
int i = 0;
- for ( TQMap<TQString,KMime::Types::QStringOrQPair>::ConstIterator
+ for ( TQMap<TQString,KMime::Types::TQStringOrTQPair>::ConstIterator
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 fa9290f20..dd1702bb1 100644
--- a/libkmime/tests/test_mdn.cpp
+++ b/libkmime/tests/test_mdn.cpp
@@ -52,31 +52,31 @@ int main( int argc, char * argv[] ) {
long_options, &option_index );
if ( c == -1 ) break;
-#define EQUALS(x) !qstricmp( optarg, x )
+#define ETQUALS(x) !qstricmp( optarg, x )
switch ( c ) {
case 'a': // --action-mode
- if ( EQUALS( "manual-action" ) )
+ if ( ETQUALS( "manual-action" ) )
actionMode = ManualAction;
- else if ( EQUALS( "automatic-action" ) )
+ else if ( ETQUALS( "automatic-action" ) )
actionMode = AutomaticAction;
else
usage( "unknown action mode!" );
break;
case 'd': // --disposition-type
- if ( EQUALS( "displayed" ) )
+ if ( ETQUALS( "displayed" ) )
dispositionType = Displayed;
- else if ( EQUALS( "deleted" ) )
+ else if ( ETQUALS( "deleted" ) )
dispositionType = Deleted;
- else if ( EQUALS( "dispatched" ) )
+ else if ( ETQUALS( "dispatched" ) )
dispositionType = Dispatched;
- else if ( EQUALS( "processed" ) )
+ else if ( ETQUALS( "processed" ) )
dispositionType = Processed;
- else if ( EQUALS( "denied" ) )
+ else if ( ETQUALS( "denied" ) )
dispositionType = Denied;
- else if ( EQUALS( "failed" ) )
+ else if ( ETQUALS( "failed" ) )
dispositionType = Failed;
else
usage( "unknown disposition type!" );
@@ -97,15 +97,15 @@ int main( int argc, char * argv[] ) {
break;
case 'm': // --disposition-modifier
- if ( EQUALS( "error" ) )
+ if ( ETQUALS( "error" ) )
dispositionModifiers << Error;
- else if ( EQUALS( "warning" ) )
+ else if ( ETQUALS( "warning" ) )
dispositionModifiers << Warning;
- else if ( EQUALS( "superseded" ) )
+ else if ( ETQUALS( "superseded" ) )
dispositionModifiers << Superseded;
- else if ( EQUALS( "expired" ) )
+ else if ( ETQUALS( "expired" ) )
dispositionModifiers << Expired;
- else if ( EQUALS( "mailbox-terminated" ) )
+ else if ( ETQUALS( "mailbox-terminated" ) )
dispositionModifiers << MailboxTerminated;
else
usage( "unknwon disposition modifier!" );
@@ -119,9 +119,9 @@ int main( int argc, char * argv[] ) {
break;
case 's': // --sending-mode
- if ( EQUALS( "MDN-sent-manually" ) )
+ if ( ETQUALS( "MDN-sent-manually" ) )
sendingMode = SentManually;
- else if ( EQUALS( "MDN-sent-automatically" ) )
+ else if ( ETQUALS( "MDN-sent-automatically" ) )
sendingMode = SentAutomatically;
else
usage( "unknown sending mode" );