From 7be55ffa061c026e35e2d6a0effe1161ddb0d41f Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:53:50 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- libkmime/kmime_codecs.cpp | 52 +++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'libkmime/kmime_codecs.cpp') 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 -#include +#include #include #include @@ -50,11 +50,11 @@ using namespace KMime; namespace KMime { // global list of KMime::Codec's -QAsciiDict* Codec::all = 0; -static KStaticDeleter > sdAll; +TQAsciiDict* Codec::all = 0; +static KStaticDeleter > sdAll; #if defined(QT_THREAD_SUPPORT) -QMutex* Codec::dictLock = 0; -static KStaticDeleter sdDictLock; +TQMutex* Codec::dictLock = 0; +static KStaticDeleter 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( 11, false /* case-insensitive */) ); + sdAll.setObject( all, new TQAsciiDict( 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 ) ) -- cgit v1.2.1