From e3555fe9705a44072a05b95cca36579745e14125 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 18 Nov 2016 13:32:19 +0100 Subject: Properly use QT_CONFIG macro to check for ICU And remove the QT_USE_ICU define. Change-Id: I8134ee18af7c90ed7070926ca31b3a57b3ec37dd Reviewed-by: Oswald Buddenhagen --- src/corelib/codecs/qtextcodec.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/corelib/codecs/qtextcodec.cpp') diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp index 0c9036aadf..aed3532024 100644 --- a/src/corelib/codecs/qtextcodec.cpp +++ b/src/corelib/codecs/qtextcodec.cpp @@ -58,7 +58,7 @@ #if !defined(QT_BOOTSTRAPPED) # include "qtsciicodec_p.h" # include "qisciicodec_p.h" -#if defined(QT_USE_ICU) +#if QT_CONFIG(icu) #include "qicucodec_p.h" #else #if QT_CONFIG(iconv) @@ -79,7 +79,7 @@ # endif // !Q_OS_INTEGRITY #endif // !QT_NO_BIG_CODECS -#endif // QT_USE_ICU +#endif // icu #endif // QT_BOOTSTRAPPED #include "qmutex.h" @@ -99,7 +99,7 @@ typedef QList::ConstIterator ByteArrayListConstIt; Q_GLOBAL_STATIC_WITH_ARGS(QMutex, textCodecsMutex, (QMutex::Recursive)); QMutex *qTextCodecsMutex() { return textCodecsMutex(); } -#if !defined(QT_USE_ICU) +#if !QT_CONFIG(icu) static char qtolower(char c) { if (c >= 'A' && c <= 'Z') return c + 0x20; return c; } static bool qisalnum(char c) @@ -306,7 +306,7 @@ static void setup() } #else static void setup() {} -#endif // QT_USE_ICU +#endif // icu /*! \enum QTextCodec::ConversionFlag @@ -519,7 +519,7 @@ QTextCodec *QTextCodec::codecForName(const QByteArray &name) return 0; setup(); -#ifndef QT_USE_ICU +#if !QT_CONFIG(icu) QTextCodecCache *cache = &globalData->codecCache; QTextCodec *codec; if (cache) { @@ -586,7 +586,7 @@ QTextCodec* QTextCodec::codecForMib(int mib) } } -#ifdef QT_USE_ICU +#if QT_CONFIG(icu) return QIcuCodec::codecForMibUnlocked(mib); #else return 0; @@ -618,7 +618,7 @@ QList QTextCodec::availableCodecs() codecs += (*it)->aliases(); } -#ifdef QT_USE_ICU +#if QT_CONFIG(icu) codecs += QIcuCodec::availableCodecs(); #endif @@ -634,7 +634,7 @@ QList QTextCodec::availableCodecs() */ QList QTextCodec::availableMibs() { -#ifdef QT_USE_ICU +#if QT_CONFIG(icu) return QIcuCodec::availableMibs(); #else QMutexLocker locker(textCodecsMutex()); @@ -688,7 +688,7 @@ QTextCodec* QTextCodec::codecForLocale() QTextCodec *codec = globalData->codecForLocale.loadAcquire(); if (!codec) { -#ifdef QT_USE_ICU +#if QT_CONFIG(icu) textCodecsMutex()->lock(); codec = QIcuCodec::defaultCodecUnlocked(); textCodecsMutex()->unlock(); -- cgit v1.2.3