diff options
author | Lars Knoll <lars.knoll@qt.io> | 2016-08-29 10:29:47 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2016-10-11 14:20:34 +0000 |
commit | 93b78e7c6135340484569a0310ca3dedceb47f31 (patch) | |
tree | 167a7ba83989ad501cccf481dac2083aae87dcef /src/corelib/kernel | |
parent | 369857d29437615e1fda9fb1ab2f94e464d55ca2 (diff) |
Fix build with various features disabled
Change-Id: I95cb3cf3434306344af3f4c7556f45dbfa0b08d6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r-- | src/corelib/kernel/qcoreglobaldata.cpp | 4 | ||||
-rw-r--r-- | src/corelib/kernel/qcoreglobaldata_p.h | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/kernel/qcoreglobaldata.cpp b/src/corelib/kernel/qcoreglobaldata.cpp index e5fb50715c..e2087b9e64 100644 --- a/src/corelib/kernel/qcoreglobaldata.cpp +++ b/src/corelib/kernel/qcoreglobaldata.cpp @@ -45,15 +45,19 @@ QT_BEGIN_NAMESPACE Q_GLOBAL_STATIC(QCoreGlobalData, globalInstance) QCoreGlobalData::QCoreGlobalData() +#if QT_CONFIG(textcodec) : codecForLocale(0) +#endif { } QCoreGlobalData::~QCoreGlobalData() { +#if QT_CONFIG(textcodec) codecForLocale = 0; for (QList<QTextCodec *>::const_iterator it = allCodecs.constBegin(); it != allCodecs.constEnd(); ++it) delete *it; +#endif } QCoreGlobalData *QCoreGlobalData::instance() diff --git a/src/corelib/kernel/qcoreglobaldata_p.h b/src/corelib/kernel/qcoreglobaldata_p.h index 32b5becf4f..c3c2f7b4a4 100644 --- a/src/corelib/kernel/qcoreglobaldata_p.h +++ b/src/corelib/kernel/qcoreglobaldata_p.h @@ -71,9 +71,11 @@ struct QCoreGlobalData { QMap<QString, QStringList> dirSearchPaths; QReadWriteLock dirSearchPathsLock; +#if QT_CONFIG(textcodec) QList<QTextCodec*> allCodecs; QAtomicPointer<QTextCodec> codecForLocale; QTextCodecCache codecCache; +#endif static QCoreGlobalData *instance(); }; |