summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDheerendra Purohit <[email protected]>2025-07-04 12:44:39 +0530
committerDheerendra Purohit <[email protected]>2025-07-04 21:43:29 +0530
commitca194c368063be8aef13dafb0ace12b0885a0e25 (patch)
treec0f3c1697ac2e06283e21cad6cc1268b7bd1cb9e
parent67d079a445602e5ac79d8d2e245139499c304835 (diff)
Doc: Clarify newline handling in QIODevice::readLine()HEADdev
Replaced incorrect statement about newline replacement with a note explaining that translation only occurs when the device is opened for reading with the QIODevice::Text fleg. Pick-to: 6.9 6.10 Fixes: QTBUG-59186 Change-Id: Id903a16df181ae445249c4b2e64714cd12c757eb Reviewed-by: Axel Spoerl <[email protected]>
-rw-r--r--src/corelib/io/qiodevice.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
index 0886f63b810..9c1bb45dd2d 100644
--- a/src/corelib/io/qiodevice.cpp
+++ b/src/corelib/io/qiodevice.cpp
@@ -1309,8 +1309,11 @@ QByteArray QIODevice::readAll()
The newline character ('\\n') is included in the buffer. If a
newline is not encountered before maxSize - 1 bytes are read, a
- newline will not be inserted into the buffer. On windows newline
- characters are replaced with '\\n'.
+ newline will not be inserted into the buffer.
+
+ \note Newline translation(e.g., converting \r to \n) is performed
+ only when the device is opened for reading with QIODevice::Text
+ flag.
Note that on sequential devices, data may not be immediately available,
which may result in a partial line being returned. By calling the