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 /libkdepim/qutf7codec.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 'libkdepim/qutf7codec.cpp')
-rw-r--r-- | libkdepim/qutf7codec.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/libkdepim/qutf7codec.cpp b/libkdepim/qutf7codec.cpp index bbee2d8ca..db6589cd9 100644 --- a/libkdepim/qutf7codec.cpp +++ b/libkdepim/qutf7codec.cpp @@ -15,7 +15,7 @@ 02110-1301, US As a special exception, permission is granted to use this plugin - with any version of Qt by TrollTech AS, Norway. In this case, the + with any version of TQt by TrollTech AS, Norway. In this case, the use of this plugin doesn't cause the resulting executable to be covered by the GNU General Public License. This exception does not however tqinvalidate any other reasons why the @@ -25,33 +25,33 @@ #include "qutf7codec.h" -#ifndef QT_NO_TEXTCODEC +#ifndef TQT_NO_TEXTCODEC -int QUtf7Codec::mibEnum() const { +int TQUtf7Codec::mibEnum() const { return 1012; } -int QStrictUtf7Codec::mibEnum() const { +int TQStrictUtf7Codec::mibEnum() const { return -1012; } -const char* QUtf7Codec::name() const { +const char* TQUtf7Codec::name() const { return "UTF-7"; } -const char* QStrictUtf7Codec::name() const { +const char* TQStrictUtf7Codec::name() const { return "X-QT-UTF-7-STRICT"; } -const char* QUtf7Codec::mimeName() const { +const char* TQUtf7Codec::mimeName() const { return "UTF-7"; } -bool QUtf7Codec::canEncode( TQChar ) const { +bool TQUtf7Codec::canEncode( TQChar ) const { return TRUE; } -bool QUtf7Codec::canEncode( const TQString & ) const { +bool TQUtf7Codec::canEncode( const TQString & ) const { return TRUE; } @@ -87,7 +87,7 @@ static inline bool isOfSet(uchar ch, uchar* set) { return set[ ch/8 ] & (0x80 >> ( ch%8 )); } -int QUtf7Codec::heuristicContentMatch(const char* chars, int len) const +int TQUtf7Codec::heuristicContentMatch(const char* chars, int len) const { int stepNo = 0; int i; @@ -136,7 +136,7 @@ int QUtf7Codec::heuristicContentMatch(const char* chars, int len) const return i; } -class QUtf7Decoder : public TQTextDecoder { +class TQUtf7Decoder : public TQTextDecoder { // the storage for our tqunicode char until it's finished ushort uc; // the state of the base64 decoding @@ -156,7 +156,7 @@ class QUtf7Decoder : public TQTextDecoder { // of a shifted-sequence. bool rightAfterEscape; public: - QUtf7Decoder() : uc(0), stepNo(0), shifted(FALSE), rightAfterEscape(FALSE) + TQUtf7Decoder() : uc(0), stepNo(0), shifted(FALSE), rightAfterEscape(FALSE) { } @@ -180,10 +180,10 @@ public: // check for 8bit char's: // if ( ch > 127 ) { - qWarning("QUtf7Decoder: 8bit char found in input. " + qWarning("TQUtf7Decoder: 8bit char found in input. " "Parser has been re-initialized!"); resetParser(); - result += TQChar::tqreplacement; + result += TQChar::replacement; continue; } @@ -228,12 +228,12 @@ public: // makes for an ill-formed sequence. // Note that we catch (the valid) "+-" pair // right at the beginning. - qWarning("QUtf7Decoder: ill-formed input: " + qWarning("TQUtf7Decoder: ill-formed input: " "non-base64 char after escaping \"+\"!"); } // pending bits from base64 encoding must be all 0: if (stepNo >= 1 && uc) { - qWarning("QUtf7Decoder: ill-formed sequence: " + qWarning("TQUtf7Decoder: ill-formed sequence: " "non-zero bits in shifted-sequence tail!"); } resetParser(); @@ -310,22 +310,22 @@ public: } // toUnicode() -}; // class QUtf7Decoder +}; // class TQUtf7Decoder -TQTextDecoder* QUtf7Codec::makeDecoder() const +TQTextDecoder* TQUtf7Codec::makeDecoder() const { - return new QUtf7Decoder; + return new TQUtf7Decoder; } -class QUtf7Encoder : public TQTextEncoder { +class TQUtf7Encoder : public TQTextEncoder { uchar dontNeedEncodingSet[16]; ushort outbits; uint stepNo : 2; bool shifted : 1; bool mayContinueShiftedSequence : 1; public: - QUtf7Encoder(bool encOpt, bool encLwsp) + TQUtf7Encoder(bool encOpt, bool encLwsp) : outbits(0), stepNo(0), shifted(FALSE), mayContinueShiftedSequence(FALSE) { @@ -537,14 +537,14 @@ public: return result; } // fromUnicode() -}; // class QUtf7Encoder +}; // class TQUtf7Encoder -TQTextEncoder* QUtf7Codec::makeEncoder() const { - return new QUtf7Encoder( false, false ); +TQTextEncoder* TQUtf7Codec::makeEncoder() const { + return new TQUtf7Encoder( false, false ); } -TQTextEncoder* QStrictUtf7Codec::makeEncoder() const { - return new QUtf7Encoder( true, false ); +TQTextEncoder* TQStrictUtf7Codec::makeEncoder() const { + return new TQUtf7Encoder( true, false ); } -#endif // QT_NO_TEXTCODEC +#endif // TQT_NO_TEXTCODEC |