diff options
Diffstat (limited to 'src/corelib/codecs')
23 files changed, 65 insertions, 56 deletions
diff --git a/src/corelib/codecs/qbig5codec.cpp b/src/corelib/codecs/qbig5codec.cpp index 4c37357d35..9e0667e7e8 100644 --- a/src/corelib/codecs/qbig5codec.cpp +++ b/src/corelib/codecs/qbig5codec.cpp @@ -43,7 +43,7 @@ QT_BEGIN_NAMESPACE -#ifndef QT_NO_TEXTCODEC +#ifndef QT_NO_BIG_CODECS static int qt_Big5hkscsToUnicode(const uchar *s, uint *pwc); static int qt_UnicodeToBig5hkscs(uint wc, uchar *r); @@ -12783,6 +12783,6 @@ int qt_UnicodeToBig5hkscs (uint wc, uchar *r) /* ====================================================================== */ -#endif // QT_NO_TEXTCODEC +#endif // QT_NO_BIG_CODECS QT_END_NAMESPACE diff --git a/src/corelib/codecs/qbig5codec_p.h b/src/corelib/codecs/qbig5codec_p.h index f90c1d8e83..b615acba41 100644 --- a/src/corelib/codecs/qbig5codec_p.h +++ b/src/corelib/codecs/qbig5codec_p.h @@ -62,7 +62,7 @@ QT_BEGIN_NAMESPACE -#ifndef QT_NO_TEXTCODEC +#ifndef QT_NO_BIG_CODECS class QBig5Codec : public QTextCodec { public: @@ -128,7 +128,7 @@ public: }; #endif // Q_OS_UNIX -#endif // QT_NO_TEXTCODEC +#endif // QT_NO_BIG_CODECS QT_END_NAMESPACE diff --git a/src/corelib/codecs/qeucjpcodec.cpp b/src/corelib/codecs/qeucjpcodec.cpp index 773c473a11..4b973ae311 100644 --- a/src/corelib/codecs/qeucjpcodec.cpp +++ b/src/corelib/codecs/qeucjpcodec.cpp @@ -77,7 +77,7 @@ QT_BEGIN_NAMESPACE -#ifndef QT_NO_TEXTCODEC +#ifndef QT_NO_BIG_CODECS static const uchar Ss2 = 0x8e; // Single Shift 2 static const uchar Ss3 = 0x8f; // Single Shift 3 @@ -256,6 +256,6 @@ QByteArray QEucJpCodec::_name() { return "EUC-JP"; } -#endif // QT_NO_TEXTCODEC +#endif // QT_NO_BIG_CODECS QT_END_NAMESPACE diff --git a/src/corelib/codecs/qeucjpcodec_p.h b/src/corelib/codecs/qeucjpcodec_p.h index 97d8523a34..e97722bd69 100644 --- a/src/corelib/codecs/qeucjpcodec_p.h +++ b/src/corelib/codecs/qeucjpcodec_p.h @@ -88,7 +88,7 @@ QT_BEGIN_NAMESPACE -#ifndef QT_NO_TEXTCODEC +#ifndef QT_NO_BIG_CODECS class QEucJpCodec : public QTextCodec { public: @@ -110,7 +110,7 @@ protected: const QJpUnicodeConv *conv; }; -#endif // QT_NO_TEXTCODEC +#endif // QT_NO_BIG_CODECS QT_END_NAMESPACE diff --git a/src/corelib/codecs/qeuckrcodec.cpp b/src/corelib/codecs/qeuckrcodec.cpp index 93a31d8d5b..f502d6fa50 100644 --- a/src/corelib/codecs/qeuckrcodec.cpp +++ b/src/corelib/codecs/qeuckrcodec.cpp @@ -70,7 +70,7 @@ QT_BEGIN_NAMESPACE -#ifndef QT_NO_TEXTCODEC +#ifndef QT_NO_BIG_CODECS unsigned int qt_Ksc5601ToUnicode(unsigned int code); unsigned int qt_UnicodeToKsc5601(unsigned int unicode); @@ -3566,6 +3566,6 @@ QString QCP949Codec::convertToUnicode(const char* chars, int len, ConverterState return result; } -#endif // QT_NO_TEXTCODEC +#endif // QT_NO_BIG_CODECS QT_END_NAMESPACE diff --git a/src/corelib/codecs/qeuckrcodec_p.h b/src/corelib/codecs/qeuckrcodec_p.h index 12ae2078be..41c46d90aa 100644 --- a/src/corelib/codecs/qeuckrcodec_p.h +++ b/src/corelib/codecs/qeuckrcodec_p.h @@ -83,7 +83,7 @@ QT_BEGIN_NAMESPACE -#ifndef QT_NO_TEXTCODEC +#ifndef QT_NO_BIG_CODECS class QEucKrCodec : public QTextCodec { public: @@ -133,7 +133,7 @@ public: }; #endif -#endif // QT_NO_TEXTCODEC +#endif // QT_NO_BIG_CODECS QT_END_NAMESPACE diff --git a/src/corelib/codecs/qfontjpcodec.cpp b/src/corelib/codecs/qfontjpcodec.cpp index 7d44be9006..5f6412f6af 100644 --- a/src/corelib/codecs/qfontjpcodec.cpp +++ b/src/corelib/codecs/qfontjpcodec.cpp @@ -45,6 +45,8 @@ QT_BEGIN_NAMESPACE +#ifndef QT_NO_BIG_CODECS + #ifdef Q_OS_UNIX // JIS X 0201 @@ -142,4 +144,6 @@ QByteArray QFontJis0208Codec::convertFromUnicode(const QChar *uc, int len, Conve #endif +#endif // QT_NO_BIG_CODECS + QT_END_NAMESPACE diff --git a/src/corelib/codecs/qfontjpcodec_p.h b/src/corelib/codecs/qfontjpcodec_p.h index 99652dc455..302c3f5b51 100644 --- a/src/corelib/codecs/qfontjpcodec_p.h +++ b/src/corelib/codecs/qfontjpcodec_p.h @@ -58,6 +58,8 @@ QT_BEGIN_NAMESPACE +#ifndef QT_NO_BIG_CODECS + class QJpUnicodeConv; #ifdef Q_OS_UNIX @@ -99,6 +101,8 @@ private: }; #endif +#endif // QT_NO_BIG_CODECS + QT_END_NAMESPACE #endif // QFONTJPCODEC_P_H diff --git a/src/corelib/codecs/qfontlaocodec.cpp b/src/corelib/codecs/qfontlaocodec.cpp index 0bc08d7920..acb6e43192 100644 --- a/src/corelib/codecs/qfontlaocodec.cpp +++ b/src/corelib/codecs/qfontlaocodec.cpp @@ -42,7 +42,6 @@ #include "qfontlaocodec_p.h" #include "qlist.h" -#ifndef QT_NO_CODECS #ifndef QT_NO_BIG_CODECS QT_BEGIN_NAMESPACE @@ -120,4 +119,3 @@ QByteArray QFontLaoCodec::convertFromUnicode(const QChar *uc, int len, Converter QT_END_NAMESPACE #endif // QT_NO_BIG_CODECS -#endif // QT_NO_CODECS diff --git a/src/corelib/codecs/qfontlaocodec_p.h b/src/corelib/codecs/qfontlaocodec_p.h index f2e2413fbf..f64ea487b3 100644 --- a/src/corelib/codecs/qfontlaocodec_p.h +++ b/src/corelib/codecs/qfontlaocodec_p.h @@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE -#ifndef QT_NO_CODECS +#ifndef QT_NO_BIG_CODECS class Q_CORE_EXPORT QFontLaoCodec : public QTextCodec { @@ -71,7 +71,7 @@ public: QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const; }; -#endif // QT_NO_CODECS +#endif // QT_NO_BIG_CODECS QT_END_NAMESPACE diff --git a/src/corelib/codecs/qgb18030codec.cpp b/src/corelib/codecs/qgb18030codec.cpp index af9d0189d1..badba7d09b 100644 --- a/src/corelib/codecs/qgb18030codec.cpp +++ b/src/corelib/codecs/qgb18030codec.cpp @@ -46,7 +46,7 @@ #include "qgb18030codec_p.h" -#ifndef QT_NO_TEXTCODEC +#ifndef QT_NO_BIG_CODECS QT_BEGIN_NAMESPACE @@ -9262,4 +9262,4 @@ int qt_UnicodeToGbk(uint uni, uchar *gbchar) { QT_END_NAMESPACE -#endif // QT_NO_TEXTCODEC +#endif // QT_NO_BIG_CODECS diff --git a/src/corelib/codecs/qgb18030codec_p.h b/src/corelib/codecs/qgb18030codec_p.h index 12f50d5048..53a647d888 100644 --- a/src/corelib/codecs/qgb18030codec_p.h +++ b/src/corelib/codecs/qgb18030codec_p.h @@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE -#ifndef QT_NO_TEXTCODEC +#ifndef QT_NO_BIG_CODECS class QGb18030Codec : public QTextCodec { public: @@ -163,7 +163,7 @@ public: }; #endif // Q_OS_UNIX -#endif // QT_NO_TEXTCODEC +#endif // QT_NO_BIG_CODECS QT_END_NAMESPACE diff --git a/src/corelib/codecs/qisciicodec.cpp b/src/corelib/codecs/qisciicodec.cpp index 0b93c4acdb..723a4dcc07 100644 --- a/src/corelib/codecs/qisciicodec.cpp +++ b/src/corelib/codecs/qisciicodec.cpp @@ -41,7 +41,7 @@ #include "qisciicodec_p.h" #include "qlist.h" -#ifndef QT_NO_CODECS +#ifndef QT_NO_BIG_CODECS QT_BEGIN_NAMESPACE @@ -282,4 +282,4 @@ QString QIsciiCodec::convertToUnicode(const char* chars, int len, ConverterState QT_END_NAMESPACE -#endif // QT_NO_CODECS +#endif // QT_NO_BIG_CODECS diff --git a/src/corelib/codecs/qisciicodec_p.h b/src/corelib/codecs/qisciicodec_p.h index 695a60ef13..70af5e801f 100644 --- a/src/corelib/codecs/qisciicodec_p.h +++ b/src/corelib/codecs/qisciicodec_p.h @@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE -#ifndef QT_NO_CODECS +#ifndef QT_NO_BIG_CODECS class QIsciiCodec : public QTextCodec { public: @@ -74,7 +74,7 @@ private: int idx; }; -#endif // QT_NO_CODECS +#endif // QT_NO_BIG_CODECS QT_END_NAMESPACE diff --git a/src/corelib/codecs/qjiscodec.cpp b/src/corelib/codecs/qjiscodec.cpp index 83c4329496..8340b5c290 100644 --- a/src/corelib/codecs/qjiscodec.cpp +++ b/src/corelib/codecs/qjiscodec.cpp @@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE -#ifndef QT_NO_TEXTCODEC +#ifndef QT_NO_BIG_CODECS enum { Esc = 0x1b, So = 0x0e, // Shift Out @@ -362,6 +362,6 @@ QList<QByteArray> QJisCodec::_aliases() return list; } -#endif // QT_NO_TEXTCODEC +#endif // QT_NO_BIG_CODECS QT_END_NAMESPACE diff --git a/src/corelib/codecs/qjiscodec_p.h b/src/corelib/codecs/qjiscodec_p.h index daccf57c87..bea9a54a04 100644 --- a/src/corelib/codecs/qjiscodec_p.h +++ b/src/corelib/codecs/qjiscodec_p.h @@ -88,7 +88,7 @@ QT_BEGIN_NAMESPACE -#ifndef QT_NO_TEXTCODEC +#ifndef QT_NO_BIG_CODECS class QJisCodec : public QTextCodec { public: @@ -110,7 +110,7 @@ protected: const QJpUnicodeConv *conv; }; -#endif // QT_NO_TEXTCODEC +#endif // QT_NO_BIG_CODECS QT_END_NAMESPACE diff --git a/src/corelib/codecs/qjpunicode.cpp b/src/corelib/codecs/qjpunicode.cpp index 1e4883fa8b..284db896cb 100644 --- a/src/corelib/codecs/qjpunicode.cpp +++ b/src/corelib/codecs/qjpunicode.cpp @@ -51,6 +51,8 @@ QT_BEGIN_NAMESPACE +#ifndef QT_NO_BIG_CODECS + #define USE_JISX0212 #define Q_STRICT @@ -10697,4 +10699,6 @@ uint QJpUnicodeConv::unicodeToCp932(uint h, uint l) const \internal */ +#endif // QT_NO_BIG_CODECS + QT_END_NAMESPACE diff --git a/src/corelib/codecs/qjpunicode_p.h b/src/corelib/codecs/qjpunicode_p.h index 07b5b25411..6fe60214ce 100644 --- a/src/corelib/codecs/qjpunicode_p.h +++ b/src/corelib/codecs/qjpunicode_p.h @@ -86,6 +86,8 @@ QT_BEGIN_NAMESPACE +#ifndef QT_NO_BIG_CODECS + class QJpUnicodeConv { public: virtual ~QJpUnicodeConv() {} @@ -180,6 +182,8 @@ private: int rule; }; +#endif // QT_NO_BIG_CODECS + QT_END_NAMESPACE #endif // QJPUNICODE_P_H diff --git a/src/corelib/codecs/qsjiscodec.cpp b/src/corelib/codecs/qsjiscodec.cpp index 27121ad449..55c57954f2 100644 --- a/src/corelib/codecs/qsjiscodec.cpp +++ b/src/corelib/codecs/qsjiscodec.cpp @@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE -#ifndef QT_NO_TEXTCODEC +#ifndef QT_NO_BIG_CODECS enum { Esc = 0x1b }; @@ -224,6 +224,6 @@ QList<QByteArray> QSjisCodec::_aliases() << "MS_Kanji"; return list; } -#endif // QT_NO_TEXTCODEC +#endif // QT_NO_BIG_CODECS QT_END_NAMESPACE diff --git a/src/corelib/codecs/qsjiscodec_p.h b/src/corelib/codecs/qsjiscodec_p.h index d57f94b55f..8144e94692 100644 --- a/src/corelib/codecs/qsjiscodec_p.h +++ b/src/corelib/codecs/qsjiscodec_p.h @@ -88,7 +88,7 @@ QT_BEGIN_NAMESPACE -#ifndef QT_NO_TEXTCODEC +#ifndef QT_NO_BIG_CODECS class QSjisCodec : public QTextCodec { public: @@ -110,7 +110,7 @@ protected: const QJpUnicodeConv *conv; }; -#endif // QT_NO_TEXTCODEC +#endif // QT_NO_BIG_CODECS QT_END_NAMESPACE diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp index b015c914eb..2cc708345e 100644 --- a/src/corelib/codecs/qtextcodec.cpp +++ b/src/corelib/codecs/qtextcodec.cpp @@ -60,24 +60,22 @@ #include "qutfcodec_p.h" #include "qsimplecodec_p.h" #include "qlatincodec_p.h" -#ifndef QT_NO_CODECS +#if !defined(QT_BOOTSTRAPPED) && !defined(QT_NO_BIG_CODECS) # include "qtsciicodec_p.h" # include "qisciicodec_p.h" -#if !defined(Q_OS_INTEGRITY) -# if !defined(QT_BOOTSTRAPPED) +# ifndef Q_OS_INTEGRITY # include "qgb18030codec_p.h" # include "qeucjpcodec_p.h" # include "qjiscodec_p.h" # include "qsjiscodec_p.h" # include "qeuckrcodec_p.h" # include "qbig5codec_p.h" -# endif // !QT_BOOTSTRAPPED -# if defined(Q_OS_UNIX) && !defined(QT_BOOTSTRAPPED) +# endif // !Q_OS_INTEGRITY +# ifdef Q_OS_UNIX # include "qfontlaocodec_p.h" # include "qfontjpcodec_p.h" # endif -#endif // !Q_OS_INTEGRITY -#endif // QT_NO_CODECS +#endif // !QT_BOOTSTRAPPED && !QT_NO_BIG_CODECS #include "qlocale.h" #include "qmutex.h" #include "qhash.h" @@ -670,15 +668,11 @@ static void setup() (void) createQTextCodecCleanup(); #ifndef QT_NO_CODECS - (void)new QTsciiCodec; - for (int i = 0; i < 9; ++i) - (void)new QIsciiCodec(i); - for (int i = 0; i < QSimpleTextCodec::numSimpleCodecs; ++i) (void)new QSimpleTextCodec(i); -# if defined(Q_OS_UNIX) && !defined(QT_BOOTSTRAPPED) - // no font codecs when bootstrapping +# if !defined(QT_BOOTSTRAPPED) && !defined(QT_NO_BIG_CODECS) +# ifdef Q_OS_UNIX (void)new QFontLaoCodec; (void)new QFontGb2312Codec; (void)new QFontGbkCodec; @@ -688,12 +682,9 @@ static void setup() (void)new QFontKsc5601Codec; (void)new QFontBig5hkscsCodec; (void)new QFontBig5Codec; -# endif // Q_OS_UNIX && !QT_BOOTSTRAPPED +# endif // Q_OS_UNIX - -#if !defined(Q_OS_INTEGRITY) -# if !defined(QT_BOOTSTRAPPED) - // no asian codecs when bootstrapping, sorry +# ifndef Q_OS_INTEGRITY (void)new QGb18030Codec; (void)new QGbkCodec; (void)new QGb2312Codec; @@ -704,8 +695,12 @@ static void setup() (void)new QCP949Codec; (void)new QBig5Codec; (void)new QBig5hkscsCodec; -# endif // !QT_BOOTSTRAPPED -#endif // !Q_OS_INTEGRITY +# endif // !Q_OS_INTEGRITY + + (void)new QTsciiCodec; + for (int i = 0; i < 9; ++i) + (void)new QIsciiCodec(i); +# endif // !QT_BOOTSTRAPPED && !QT_NO_BIG_CODECS #endif // QT_NO_CODECS #if defined(Q_OS_WIN32) || defined(Q_OS_WINCE) diff --git a/src/corelib/codecs/qtsciicodec.cpp b/src/corelib/codecs/qtsciicodec.cpp index 345b4afac2..c8217f7aea 100644 --- a/src/corelib/codecs/qtsciicodec.cpp +++ b/src/corelib/codecs/qtsciicodec.cpp @@ -46,7 +46,7 @@ #include "qtsciicodec_p.h" #include "qlist.h" -#ifndef QT_NO_CODECS +#ifndef QT_NO_BIG_CODECS QT_BEGIN_NAMESPACE @@ -495,4 +495,4 @@ static unsigned int qt_TSCIIToUnicode(uint code, uint *s) QT_END_NAMESPACE -#endif // QT_NO_CODECS +#endif // QT_NO_BIG_CODECS diff --git a/src/corelib/codecs/qtsciicodec_p.h b/src/corelib/codecs/qtsciicodec_p.h index 17c37d613d..5fcaad27c6 100644 --- a/src/corelib/codecs/qtsciicodec_p.h +++ b/src/corelib/codecs/qtsciicodec_p.h @@ -86,7 +86,7 @@ QT_BEGIN_NAMESPACE -#ifndef QT_NO_CODECS +#ifndef QT_NO_BIG_CODECS class QTsciiCodec : public QTextCodec { public: @@ -99,7 +99,7 @@ public: QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const; }; -#endif // QT_NO_CODECS +#endif // QT_NO_BIG_CODECS QT_END_NAMESPACE |