summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qcoreglobaldata.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/kernel/qcoreglobaldata.cpp')
-rw-r--r--src/corelib/kernel/qcoreglobaldata.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/corelib/kernel/qcoreglobaldata.cpp b/src/corelib/kernel/qcoreglobaldata.cpp
index d8ffcaae48..7d06f0e392 100644
--- a/src/corelib/kernel/qcoreglobaldata.cpp
+++ b/src/corelib/kernel/qcoreglobaldata.cpp
@@ -40,11 +40,24 @@
****************************************************************************/
#include "qcoreglobaldata_p.h"
+#include "qtextcodec.h"
QT_BEGIN_NAMESPACE
Q_GLOBAL_STATIC(QCoreGlobalData, globalInstance)
+QCoreGlobalData::QCoreGlobalData()
+ : codecForLocale(0)
+{
+}
+
+QCoreGlobalData::~QCoreGlobalData()
+{
+ codecForLocale = 0;
+ for (QList<QTextCodec *>::const_iterator it = allCodecs.constBegin(); it != allCodecs.constEnd(); ++it)
+ delete *it;
+}
+
QCoreGlobalData *QCoreGlobalData::instance()
{
return globalInstance();