summaryrefslogtreecommitdiffstats
path: root/src/corelib/codecs/qtextcodec.cpp
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@nokia.com>2010-01-12 08:07:22 (GMT)
committerMorten Johan Sørvig <morten.sorvig@nokia.com>2010-01-12 08:07:22 (GMT)
commitb73b5e5a99418cef3b218435382724ab71999558 (patch)
tree1b41b496472fac0fd47d93daa3593271e7ac7a7e /src/corelib/codecs/qtextcodec.cpp
parent705ebaea0d81c76c97e7230f0acbe85442981555 (diff)
parente8f45c5ba8371053817f13e70d78b06f229d8666 (diff)
downloadQt-b73b5e5a99418cef3b218435382724ab71999558.zip
Qt-b73b5e5a99418cef3b218435382724ab71999558.tar.gz
Qt-b73b5e5a99418cef3b218435382724ab71999558.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'src/corelib/codecs/qtextcodec.cpp')
-rw-r--r--src/corelib/codecs/qtextcodec.cpp49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp
index 5d62095..65152ca 100644
--- a/src/corelib/codecs/qtextcodec.cpp
+++ b/src/corelib/codecs/qtextcodec.cpp
@@ -1163,6 +1163,19 @@ QTextDecoder* QTextCodec::makeDecoder() const
return new QTextDecoder(this);
}
+/*!
+ Creates a QTextDecoder with a specified \a flags to decode chunks
+ of \c{char *} data to create chunks of Unicode data.
+
+ The caller is responsible for deleting the returned object.
+
+ \since 4.7
+*/
+QTextDecoder* QTextCodec::makeDecoder(QTextCodec::ConversionFlags flags) const
+{
+ return new QTextDecoder(this, flags);
+}
+
/*!
Creates a QTextEncoder which stores enough state to encode chunks
@@ -1176,6 +1189,19 @@ QTextEncoder* QTextCodec::makeEncoder() const
}
/*!
+ Creates a QTextEncoder with a specified \a flags to encode chunks
+ of Unicode data as \c{char *} data.
+
+ The caller is responsible for deleting the returned object.
+
+ \since 4.7
+*/
+QTextEncoder* QTextCodec::makeEncoder(QTextCodec::ConversionFlags flags) const
+{
+ return new QTextEncoder(this, flags);
+}
+
+/*!
\fn QByteArray QTextCodec::fromUnicode(const QChar *input, int number,
ConverterState *state) const
@@ -1316,6 +1342,17 @@ QString QTextCodec::toUnicode(const char *chars) const
*/
/*!
+ Constructs a text encoder for the given \a codec and conversion \a flags.
+
+ \since 4.7
+*/
+QTextEncoder::QTextEncoder(const QTextCodec *codec, QTextCodec::ConversionFlags flags)
+ : c(codec), state()
+{
+ state.flags = flags;
+}
+
+/*!
Destroys the encoder.
*/
QTextEncoder::~QTextEncoder()
@@ -1392,6 +1429,18 @@ QByteArray QTextEncoder::fromUnicode(const QString& uc, int& lenInOut)
*/
/*!
+ Constructs a text decoder for the given \a codec and conversion \a flags.
+
+ \since 4.7
+*/
+
+QTextDecoder::QTextDecoder(const QTextCodec *codec, QTextCodec::ConversionFlags flags)
+ : c(codec), state()
+{
+ state.flags = flags;
+}
+
+/*!
Destroys the decoder.
*/
QTextDecoder::~QTextDecoder()