summaryrefslogtreecommitdiffstats
path: root/src/corelib/codecs/qtextcodec.h
diff options
context:
space:
mode:
authorIain <qt-info@nokia.com>2010-04-13 08:46:39 (GMT)
committerIain <qt-info@nokia.com>2010-04-13 08:46:39 (GMT)
commitef84739c3737d03da9de2b5e92a68f70294c65d3 (patch)
tree442cc0906ff5e5ee079d0777d7d6d1a1b66fce0a /src/corelib/codecs/qtextcodec.h
parenta036df97b0f66a8bf57171c5725becf2d2b6467b (diff)
parent921f54e051b6fcc0268097347e2ad13ba0bfc37d (diff)
downloadQt-ef84739c3737d03da9de2b5e92a68f70294c65d3.zip
Qt-ef84739c3737d03da9de2b5e92a68f70294c65d3.tar.gz
Qt-ef84739c3737d03da9de2b5e92a68f70294c65d3.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.7
Diffstat (limited to 'src/corelib/codecs/qtextcodec.h')
-rw-r--r--src/corelib/codecs/qtextcodec.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/corelib/codecs/qtextcodec.h b/src/corelib/codecs/qtextcodec.h
index e37527d..4ba8b85 100644
--- a/src/corelib/codecs/qtextcodec.h
+++ b/src/corelib/codecs/qtextcodec.h
@@ -148,12 +148,13 @@ public:
private:
friend class QTextCodecCleanup;
static QTextCodec *cftr;
+ static bool validCodecs();
};
Q_DECLARE_OPERATORS_FOR_FLAGS(QTextCodec::ConversionFlags)
-inline QTextCodec* QTextCodec::codecForTr() { return cftr; }
+ inline QTextCodec* QTextCodec::codecForTr() { return validCodecs() ? cftr : 0; }
inline void QTextCodec::setCodecForTr(QTextCodec *c) { cftr = c; }
-inline QTextCodec* QTextCodec::codecForCStrings() { return QString::codecForCStrings; }
+inline QTextCodec* QTextCodec::codecForCStrings() { return validCodecs() ? QString::codecForCStrings : 0; }
inline void QTextCodec::setCodecForCStrings(QTextCodec *c) { QString::codecForCStrings = c; }
class Q_CORE_EXPORT QTextEncoder {