diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2010-04-12 15:39:28 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2010-04-12 15:39:28 (GMT) |
commit | 3723f30a91eda1c1b247598913cfc02b001a02c9 (patch) | |
tree | 234241d0d6dbbf29857c4e66d2723f77239f31ee /src/corelib/codecs/qtextcodec.h | |
parent | 6f736694461edc25b6e757f40ab9cad6a9207ad4 (diff) | |
parent | 957f36cb498657f94f1b5b92f52713254ff8c051 (diff) | |
download | Qt-3723f30a91eda1c1b247598913cfc02b001a02c9.zip Qt-3723f30a91eda1c1b247598913cfc02b001a02c9.tar.gz Qt-3723f30a91eda1c1b247598913cfc02b001a02c9.tar.bz2 |
Merge remote branch 'origin/4.6' into qt-4.7-from-4.6
Conflicts:
qmake/generators/symbian/symmake.cpp
src/gui/image/qimage.cpp
src/openvg/qwindowsurface_vgegl.cpp
Diffstat (limited to 'src/corelib/codecs/qtextcodec.h')
-rw-r--r-- | src/corelib/codecs/qtextcodec.h | 5 |
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 { |