build and load text codecs regardless of iconv and platform
Otherwise applications linking to static Qt may have to import the static plugins to avoid linking failure even if they do not use the codecs, which is a nuisance. Also, this is preparation for moving these codecs into QtCore proper. Change-Id: I71f3bbb0bac6261983143d0578757b34997d1364 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
85594bd972
commit
7ee3d8c8ec
@ -8,7 +8,14 @@ HEADERS += \
|
||||
codecs/qtextcodec.h \
|
||||
codecs/qtsciicodec_p.h \
|
||||
codecs/qutfcodec_p.h \
|
||||
codecs/qtextcodecplugin.h
|
||||
codecs/qtextcodecplugin.h \
|
||||
../plugins/codecs/cn/qgb18030codec.h \
|
||||
../plugins/codecs/jp/qeucjpcodec.h \
|
||||
../plugins/codecs/jp/qjiscodec.h \
|
||||
../plugins/codecs/jp/qsjiscodec.h \
|
||||
../plugins/codecs/kr/qeuckrcodec.h \
|
||||
../plugins/codecs/tw/qbig5codec.h \
|
||||
../plugins/codecs/jp/qfontjpcodec.h
|
||||
|
||||
SOURCES += \
|
||||
codecs/qisciicodec.cpp \
|
||||
@ -17,7 +24,15 @@ SOURCES += \
|
||||
codecs/qtextcodec.cpp \
|
||||
codecs/qtsciicodec.cpp \
|
||||
codecs/qutfcodec.cpp \
|
||||
codecs/qtextcodecplugin.cpp
|
||||
codecs/qtextcodecplugin.cpp \
|
||||
../plugins/codecs/cn/qgb18030codec.cpp \
|
||||
../plugins/codecs/jp/qjpunicode.cpp \
|
||||
../plugins/codecs/jp/qeucjpcodec.cpp \
|
||||
../plugins/codecs/jp/qjiscodec.cpp \
|
||||
../plugins/codecs/jp/qsjiscodec.cpp \
|
||||
../plugins/codecs/kr/qeuckrcodec.cpp \
|
||||
../plugins/codecs/tw/qbig5codec.cpp \
|
||||
../plugins/codecs/jp/qfontjpcodec.cpp
|
||||
|
||||
unix {
|
||||
SOURCES += codecs/qfontlaocodec.cpp
|
||||
@ -34,24 +49,5 @@ unix {
|
||||
HEADERS += codecs/qiconvcodec_p.h
|
||||
SOURCES += codecs/qiconvcodec.cpp
|
||||
DEFINES += GNU_LIBICONV
|
||||
} else {
|
||||
# no iconv, so we put all plugins in the library
|
||||
HEADERS += \
|
||||
../plugins/codecs/cn/qgb18030codec.h \
|
||||
../plugins/codecs/jp/qeucjpcodec.h \
|
||||
../plugins/codecs/jp/qjiscodec.h \
|
||||
../plugins/codecs/jp/qsjiscodec.h \
|
||||
../plugins/codecs/kr/qeuckrcodec.h \
|
||||
../plugins/codecs/tw/qbig5codec.h \
|
||||
../plugins/codecs/jp/qfontjpcodec.h
|
||||
SOURCES += \
|
||||
../plugins/codecs/cn/qgb18030codec.cpp \
|
||||
../plugins/codecs/jp/qjpunicode.cpp \
|
||||
../plugins/codecs/jp/qeucjpcodec.cpp \
|
||||
../plugins/codecs/jp/qjiscodec.cpp \
|
||||
../plugins/codecs/jp/qsjiscodec.cpp \
|
||||
../plugins/codecs/kr/qeuckrcodec.cpp \
|
||||
../plugins/codecs/tw/qbig5codec.cpp \
|
||||
../plugins/codecs/jp/qfontjpcodec.cpp
|
||||
}
|
||||
}
|
||||
|
@ -65,15 +65,14 @@
|
||||
# include "qtsciicodec_p.h"
|
||||
# include "qisciicodec_p.h"
|
||||
#if !defined(Q_OS_INTEGRITY)
|
||||
# if defined(QT_NO_ICONV) && !defined(QT_BOOTSTRAPPED)
|
||||
// no iconv(3) support, must build all codecs into the library
|
||||
# if !defined(QT_BOOTSTRAPPED)
|
||||
# include "../../plugins/codecs/cn/qgb18030codec.h"
|
||||
# include "../../plugins/codecs/jp/qeucjpcodec.h"
|
||||
# include "../../plugins/codecs/jp/qjiscodec.h"
|
||||
# include "../../plugins/codecs/jp/qsjiscodec.h"
|
||||
# include "../../plugins/codecs/kr/qeuckrcodec.h"
|
||||
# include "../../plugins/codecs/tw/qbig5codec.h"
|
||||
# endif // QT_NO_ICONV
|
||||
# endif // !QT_BOOTSTRAPPED
|
||||
# if defined(Q_OS_UNIX) && !defined(QT_BOOTSTRAPPED)
|
||||
# include "qfontlaocodec_p.h"
|
||||
# include "../../plugins/codecs/jp/qfontjpcodec.h"
|
||||
@ -730,8 +729,6 @@ static void setup()
|
||||
# if defined(Q_OS_UNIX) && !defined(QT_BOOTSTRAPPED)
|
||||
// no font codecs when bootstrapping
|
||||
(void)new QFontLaoCodec;
|
||||
# if defined(QT_NO_ICONV)
|
||||
// no iconv(3) support, must build all codecs into the library
|
||||
(void)new QFontGb2312Codec;
|
||||
(void)new QFontGbkCodec;
|
||||
(void)new QFontGb18030_0Codec;
|
||||
@ -740,12 +737,11 @@ static void setup()
|
||||
(void)new QFontKsc5601Codec;
|
||||
(void)new QFontBig5hkscsCodec;
|
||||
(void)new QFontBig5Codec;
|
||||
# endif // QT_NO_ICONV && !QT_BOOTSTRAPPED
|
||||
# endif // Q_OS_UNIX
|
||||
# endif // Q_OS_UNIX && !QT_BOOTSTRAPPED
|
||||
|
||||
|
||||
#if !defined(Q_OS_INTEGRITY)
|
||||
# if defined(QT_NO_ICONV) && !defined(QT_BOOTSTRAPPED)
|
||||
# if !defined(QT_BOOTSTRAPPED)
|
||||
// no asian codecs when bootstrapping, sorry
|
||||
(void)new QGb18030Codec;
|
||||
(void)new QGbkCodec;
|
||||
@ -757,7 +753,7 @@ static void setup()
|
||||
(void)new QCP949Codec;
|
||||
(void)new QBig5Codec;
|
||||
(void)new QBig5hkscsCodec;
|
||||
# endif // QT_NO_ICONV && !QT_BOOTSTRAPPED
|
||||
# endif // !QT_BOOTSTRAPPED
|
||||
#endif // !Q_OS_INTEGRITY
|
||||
#endif // QT_NO_CODECS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user