disable codecs for asian language when QT_NO_BIG_CODECS defined
authorTasuku Suzuki <tasuku.suzuki@nokia.com>
Fri, 1 Jun 2012 03:42:50 +0000 (12:42 +0900)
committerQt by Nokia <qt-info@nokia.com>
Thu, 14 Jun 2012 03:26:26 +0000 (05:26 +0200)
Change-Id: I45025b13bacc5f63946b02a87c742beff1946c0b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
25 files changed:
src/corelib/codecs/qbig5codec.cpp
src/corelib/codecs/qbig5codec_p.h
src/corelib/codecs/qeucjpcodec.cpp
src/corelib/codecs/qeucjpcodec_p.h
src/corelib/codecs/qeuckrcodec.cpp
src/corelib/codecs/qeuckrcodec_p.h
src/corelib/codecs/qfontjpcodec.cpp
src/corelib/codecs/qfontjpcodec_p.h
src/corelib/codecs/qfontlaocodec.cpp
src/corelib/codecs/qfontlaocodec_p.h
src/corelib/codecs/qgb18030codec.cpp
src/corelib/codecs/qgb18030codec_p.h
src/corelib/codecs/qisciicodec.cpp
src/corelib/codecs/qisciicodec_p.h
src/corelib/codecs/qjiscodec.cpp
src/corelib/codecs/qjiscodec_p.h
src/corelib/codecs/qjpunicode.cpp
src/corelib/codecs/qjpunicode_p.h
src/corelib/codecs/qsjiscodec.cpp
src/corelib/codecs/qsjiscodec_p.h
src/corelib/codecs/qtextcodec.cpp
src/corelib/codecs/qtsciicodec.cpp
src/corelib/codecs/qtsciicodec_p.h
src/corelib/global/qfeatures.h
src/corelib/global/qfeatures.txt

index 4c37357..9e0667e 100644 (file)
@@ -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
index f90c1d8..b615acb 100644 (file)
@@ -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
 
index 773c473..4b973ae 100644 (file)
@@ -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
index 97d8523..e97722b 100644 (file)
@@ -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
 
index 93a31d8..f502d6f 100644 (file)
@@ -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
index 12ae207..41c46d9 100644 (file)
@@ -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
 
index 7d44be9..5f6412f 100644 (file)
@@ -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
index 99652dc..302c3f5 100644 (file)
@@ -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
index 0bc08d7..acb6e43 100644 (file)
@@ -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
index f2e2413..f64ea48 100644 (file)
@@ -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
 
index af9d018..badba7d 100644 (file)
@@ -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
index 12f50d5..53a647d 100644 (file)
@@ -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
 
index 0b93c4a..723a4dc 100644 (file)
@@ -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
index 695a60e..70af5e8 100644 (file)
@@ -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
 
index 83c4329..8340b5c 100644 (file)
@@ -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
index daccf57..bea9a54 100644 (file)
@@ -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
 
index 1e4883f..284db89 100644 (file)
@@ -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
index 07b5b25..6fe6021 100644 (file)
@@ -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
index 27121ad..55c5795 100644 (file)
@@ -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
index d57f94b..8144e94 100644 (file)
@@ -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
 
index b015c91..2cc7083 100644 (file)
 #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)
index 345b4af..c8217f7 100644 (file)
@@ -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
index 17c37d6..5fcaad2 100644 (file)
@@ -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
 
index 2451668..7abddda 100644 (file)
@@ -49,9 +49,6 @@
 // QAction
 //#define QT_NO_ACTION
 
-// Big Codecs
-//#define QT_NO_BIG_CODECS
-
 // QClipboard
 //#define QT_NO_CLIPBOARD
 
 #define QT_NO_ANIMATION
 #endif
 
+// Big Codecs
+#if !defined(QT_NO_BIG_CODECS) && (defined(QT_NO_TEXTCODEC))
+#define QT_NO_BIG_CODECS
+#endif
+
 // QButtonGroup
 #if !defined(QT_NO_BUTTONGROUP) && (defined(QT_NO_GROUPBOX))
 #define QT_NO_BUTTONGROUP
index 0512beb..7771282 100644 (file)
@@ -956,7 +956,7 @@ SeeAlso: ???
 Feature: BIG_CODECS
 Description: Supports big codecs, e.g. CJK.
 Section: Internationalization
-Requires:
+Requires: TEXTCODEC
 Name: Big Codecs
 SeeAlso: ???