From f0841fe4cfc31c32a311aeb724ac5ae9c8462af0 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Thu, 12 Jan 2012 23:56:35 +0100 Subject: remove symbian support vestiges from text codecs Change-Id: I7b577d360cb9c7225da108ee56fd927a91a04dee Reviewed-by: Friedemann Kleint Reviewed-by: Oswald Buddenhagen Reviewed-by: Olivier Goffart --- src/corelib/codecs/qtextcodec.cpp | 41 +++++---------------------------------- 1 file changed, 5 insertions(+), 36 deletions(-) (limited to 'src/corelib/codecs/qtextcodec.cpp') diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp index 071bd1e319..83bb406ff1 100644 --- a/src/corelib/codecs/qtextcodec.cpp +++ b/src/corelib/codecs/qtextcodec.cpp @@ -64,7 +64,7 @@ #ifndef QT_NO_CODECS # include "qtsciicodec_p.h" # include "qisciicodec_p.h" -#if !defined(Q_OS_SYMBIAN) && !defined(Q_OS_INTEGRITY) +#if !defined(Q_OS_INTEGRITY) # if defined(QT_NO_ICONV) && !defined(QT_BOOTSTRAPPED) // no iconv(3) support, must build all codecs into the library # include "../../plugins/codecs/cn/qgb18030codec.h" @@ -78,7 +78,7 @@ # include "qfontlaocodec_p.h" # include "../../plugins/codecs/jp/qfontjpcodec.h" # endif -#endif // QT_NO_SYMBIAN +#endif // !Q_OS_INTEGRITY #endif // QT_NO_CODECS #include "qlocale.h" #include "qmutex.h" @@ -95,10 +95,6 @@ # define QT_NO_SETLOCALE #endif -#ifdef Q_OS_SYMBIAN -#include "qtextcodec_symbian.cpp" -#endif - // enabling this is not exception safe! // #define Q_DEBUG_TEXTCODEC @@ -231,14 +227,7 @@ Q_GLOBAL_STATIC(QTextCodecCleanup, createQTextCodecCleanup) bool QTextCodec::validCodecs() { -#ifdef Q_OS_SYMBIAN - // If we don't have a trap handler, we're outside of the main() function, - // ie. in global constructors or destructors. Don't use codecs in this - // case as it would lead to crashes because we don't have a cleanup stack on Symbian - return (User::TrapHandler() != NULL); -#else return true; -#endif } @@ -588,12 +577,6 @@ static QTextCodec *checkForCodec(const QByteArray &name) { */ static void setupLocaleMapper() { -#ifdef Q_OS_SYMBIAN - localeMapper = QSymbianTextCodec::localeMapper; - if (localeMapper) - return; -#endif - #if defined(Q_OS_WIN32) || defined(Q_OS_WINCE) localeMapper = QTextCodec::codecForName("System"); #else @@ -728,14 +711,6 @@ static void setup() if (all) return; -#ifdef Q_OS_SYMBIAN - // If we don't have a trap handler, we're outside of the main() function, - // ie. in global constructors or destructors. Don't create codecs in this - // case as it would lead to crashes because of a missing cleanup stack on Symbian - if (User::TrapHandler() == NULL) - return; -#endif - #ifdef Q_DEBUG_TEXTCODEC if (destroying_is_ok) qWarning("QTextCodec: Creating new codec during codec cleanup"); @@ -752,10 +727,6 @@ static void setup() for (int i = 0; i < QSimpleTextCodec::numSimpleCodecs; ++i) (void)new QSimpleTextCodec(i); -#ifdef Q_OS_SYMBIAN - localeMapper = QSymbianTextCodec::init(); -#endif - # if defined(Q_OS_UNIX) && !defined(QT_BOOTSTRAPPED) // no font codecs when bootstrapping (void)new QFontLaoCodec; @@ -773,7 +744,7 @@ static void setup() # endif // Q_OS_UNIX -#if !defined(Q_OS_SYMBIAN) && !defined(Q_OS_INTEGRITY) +#if !defined(Q_OS_INTEGRITY) # if defined(QT_NO_ICONV) && !defined(QT_BOOTSTRAPPED) // no asian codecs when bootstrapping, sorry (void)new QGb18030Codec; @@ -787,7 +758,7 @@ static void setup() (void)new QBig5Codec; (void)new QBig5hkscsCodec; # endif // QT_NO_ICONV && !QT_BOOTSTRAPPED -#endif //Q_OS_SYMBIAN +#endif // !Q_OS_INTEGRITY #endif // QT_NO_CODECS #if defined(Q_OS_WIN32) || defined(Q_OS_WINCE) @@ -800,13 +771,11 @@ static void setup() (void)new QUtf32Codec; (void)new QUtf32BECodec; (void)new QUtf32LECodec; -#ifndef Q_OS_SYMBIAN (void)new QLatin15Codec; -#endif (void)new QLatin1Codec; (void)new QUtf8Codec; -#if !defined(Q_OS_SYMBIAN) && !defined(Q_OS_INTEGRITY) +#if !defined(Q_OS_INTEGRITY) #if defined(Q_OS_UNIX) && !defined(QT_NO_ICONV) && !defined(QT_BOOTSTRAPPED) // QIconvCodec depends on the UTF-16 codec, so it needs to be created last (void) new QIconvCodec(); -- cgit v1.2.3