diff options
Diffstat (limited to 'src/corelib/codecs/qtextcodec.h')
-rw-r--r-- | src/corelib/codecs/qtextcodec.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/corelib/codecs/qtextcodec.h b/src/corelib/codecs/qtextcodec.h index e37527d..a099dd9 100644 --- a/src/corelib/codecs/qtextcodec.h +++ b/src/corelib/codecs/qtextcodec.h @@ -85,6 +85,9 @@ public: static QTextCodec *codecForUtfText(const QByteArray &ba); static QTextCodec *codecForUtfText(const QByteArray &ba, QTextCodec *defaultCodec); + QTextDecoder* makeDecoder() const; + QTextEncoder* makeEncoder() const; + bool canEncode(QChar) const; bool canEncode(const QString&) const; @@ -117,12 +120,6 @@ public: QByteArray fromUnicode(const QChar *in, int length, ConverterState *state = 0) const { return convertFromUnicode(in, length, state); } - // ### Qt 5: merge these functions. - QTextDecoder* makeDecoder() const; - QTextDecoder* makeDecoder(ConversionFlags flags) const; - QTextEncoder* makeEncoder() const; - QTextEncoder* makeEncoder(ConversionFlags flags) const; - virtual QByteArray name() const = 0; virtual QList<QByteArray> aliases() const; virtual int mibEnum() const = 0; @@ -160,7 +157,6 @@ class Q_CORE_EXPORT QTextEncoder { Q_DISABLE_COPY(QTextEncoder) public: explicit QTextEncoder(const QTextCodec *codec) : c(codec), state() {} - QTextEncoder(const QTextCodec *codec, QTextCodec::ConversionFlags flags); ~QTextEncoder(); QByteArray fromUnicode(const QString& str); QByteArray fromUnicode(const QChar *uc, int len); @@ -171,13 +167,17 @@ public: private: const QTextCodec *c; QTextCodec::ConverterState state; + + friend class QXmlStreamWriter; + friend class QXmlStreamWriterPrivate; + friend class QCoreXmlStreamWriter; + friend class QCoreXmlStreamWriterPrivate; }; class Q_CORE_EXPORT QTextDecoder { Q_DISABLE_COPY(QTextDecoder) public: explicit QTextDecoder(const QTextCodec *codec) : c(codec), state() {} - QTextDecoder(const QTextCodec *codec, QTextCodec::ConversionFlags flags); ~QTextDecoder(); QString toUnicode(const char* chars, int len); QString toUnicode(const QByteArray &ba); |