disable codecs for asian language when QT_NO_BIG_CODECS defined

Change-Id: I45025b13bacc5f63946b02a87c742beff1946c0b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
bb10
Tasuku Suzuki 2012-06-01 12:42:50 +09:00 committed by Qt by Nokia
parent f00012aa89
commit 5a7937bb04
25 changed files with 71 additions and 60 deletions

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View File

@ -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)

View 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

View 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

View File

@ -49,9 +49,6 @@
// QAction
//#define QT_NO_ACTION
// Big Codecs
//#define QT_NO_BIG_CODECS
// QClipboard
//#define QT_NO_CLIPBOARD
@ -255,6 +252,11 @@
#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

View 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: ???