summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qfile.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-04-28 17:01:11 +0200
committerLars Knoll <lars.knoll@qt.io>2020-05-14 07:50:13 +0200
commit33bb695a2895fb7199b256a4fd76923c32a8587a (patch)
tree78bcb9e1611433be28bd788040db7972017976b8 /src/corelib/io/qfile.cpp
parent8835c64f795b641619b852c2055605afd9d16442 (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/io/qfile.cpp')
-rw-r--r--src/corelib/io/qfile.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp
index 2a9c24bbd5..2544496c32 100644
--- a/src/corelib/io/qfile.cpp
+++ b/src/corelib/io/qfile.cpp
@@ -173,9 +173,8 @@ QAbstractFileEngine *QFilePrivate::engine() const
QTextStream takes care of converting the 8-bit data stored on
disk into a 16-bit Unicode QString. By default, it assumes that
- the user system's local 8-bit encoding is used (e.g., UTF-8
- on most unix based operating systems; see QTextCodec::codecForLocale() for
- details). This can be changed using \l QTextStream::setCodec().
+ the file is encoded in UTF-8. This can be changed using
+ \l QTextStream::setEncoding().
To write text, we can use operator<<(), which is overloaded to
take a QTextStream on the left and various data types (including