summaryrefslogtreecommitdiffstats
path: root/src/corelib/codecs/qtextcodec.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2016-11-18 13:32:19 +0100
committerLars Knoll <lars.knoll@qt.io>2016-11-29 19:04:37 +0000
commite3555fe9705a44072a05b95cca36579745e14125 (patch)
tree1685f95a262415e2f458fb0e75fcc255835a48af /src/corelib/codecs/qtextcodec.cpp
parent0c8f3229de8ec4a8e70d4b41672074b94a45b1fe (diff)
Properly use QT_CONFIG macro to check for ICU
And remove the QT_USE_ICU define. Change-Id: I8134ee18af7c90ed7070926ca31b3a57b3ec37dd Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/corelib/codecs/qtextcodec.cpp')
-rw-r--r--src/corelib/codecs/qtextcodec.cpp18
1 files changed, 9 insertions, 9 deletions
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<QByteArray>::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<QByteArray> QTextCodec::availableCodecs()
codecs += (*it)->aliases();
}
-#ifdef QT_USE_ICU
+#if QT_CONFIG(icu)
codecs += QIcuCodec::availableCodecs();
#endif
@@ -634,7 +634,7 @@ QList<QByteArray> QTextCodec::availableCodecs()
*/
QList<int> 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();