From f80ed83cd92deb015b78c39f4c634c046ef75b1c Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sat, 20 Oct 2018 21:55:20 -0700 Subject: Correct which codecs QTextStream::autoDetectUnicode detects Fixes: QTBUG-67187 Change-Id: If7e743cf8476463880ccfffd155f86b78a279f81 Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/corelib/serialization/qtextstream.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/corelib/serialization') diff --git a/src/corelib/serialization/qtextstream.cpp b/src/corelib/serialization/qtextstream.cpp index 05a5a55926..2d22cb291d 100644 --- a/src/corelib/serialization/qtextstream.cpp +++ b/src/corelib/serialization/qtextstream.cpp @@ -3111,15 +3111,15 @@ QTextCodec *QTextStream::codec() const } /*! - If \a enabled is true, QTextStream will attempt to detect Unicode - encoding by peeking into the stream data to see if it can find the - UTF-16 or UTF-32 BOM (Byte Order Mark). If this mark is found, QTextStream - will replace the current codec with the UTF codec. + If \a enabled is true, QTextStream will attempt to detect Unicode encoding + by peeking into the stream data to see if it can find the UTF-8, UTF-16, or + UTF-32 Byte Order Mark (BOM). If this mark is found, QTextStream will + replace the current codec with the UTF codec. This function can be used together with setCodec(). It is common to set the codec to UTF-8, and then enable UTF-16 detection. - \sa autoDetectUnicode(), setCodec() + \sa autoDetectUnicode(), setCodec(), QTextCodec::codecForUtfText() */ void QTextStream::setAutoDetectUnicode(bool enabled) { @@ -3131,7 +3131,7 @@ void QTextStream::setAutoDetectUnicode(bool enabled) Returns \c true if automatic Unicode detection is enabled, otherwise returns \c false. Automatic Unicode detection is enabled by default. - \sa setAutoDetectUnicode(), setCodec() + \sa setAutoDetectUnicode(), setCodec(), QTextCodec::codecForUtfText() */ bool QTextStream::autoDetectUnicode() const { -- cgit v1.2.3