diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
commit | 67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch) | |
tree | 5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /libkmime/kmime_codec_qp.cpp | |
parent | 2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff) | |
download | tdepim-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/kmime_codec_qp.cpp')
-rw-r--r-- | libkmime/kmime_codec_qp.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
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: |