diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-04-28 17:01:11 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-05-14 07:50:13 +0200 |
commit | 33bb695a2895fb7199b256a4fd76923c32a8587a (patch) | |
tree | 78bcb9e1611433be28bd788040db7972017976b8 /src/corelib/doc/snippets/code | |
parent | 8835c64f795b641619b852c2055605afd9d16442 (diff) |
Start porting QTextStream away from QTextCodec
As a first step add setEncoding/encoding() methods that use the
QStringConverter::Encoding enum, and port all uses of setCodec()/
codec() over to the new API.
Internally QTextStream still uses QTextCodec, this will be ported
over to QStringConverter in a follow-up change.
Change-Id: Icd764cf47b449b57f4ebd010c2dad89e6717d6c0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/doc/snippets/code')
-rw-r--r-- | src/corelib/doc/snippets/code/src_corelib_io_qtextstream.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/doc/snippets/code/src_corelib_io_qtextstream.cpp b/src/corelib/doc/snippets/code/src_corelib_io_qtextstream.cpp index c30f13df5a..4795650748 100644 --- a/src/corelib/doc/snippets/code/src_corelib_io_qtextstream.cpp +++ b/src/corelib/doc/snippets/code/src_corelib_io_qtextstream.cpp @@ -135,5 +135,5 @@ stream << '\n' << Qt::flush; //! [10] QTextStream out(&file); -out.setCodec("UTF-8"); +out.setEncoding(QStringConverter::Utf8); //! [10] |