summaryrefslogtreecommitdiffstats
path: root/libkmime/kmime_codecs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libkmime/kmime_codecs.cpp')
-rw-r--r--libkmime/kmime_codecs.cpp52
1 files changed, 26 insertions, 26 deletions
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 ) )