QIODevice: improve QIODevice::readLine() documentation
Pick-to: 6.8 6.7 6.5 Change-Id: I252c0faf982ff8328475243fdbc86cc4d1462498 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This commit is contained in:
parent
8b42efcbc2
commit
bbf980e43f
@ -1430,6 +1430,12 @@ qint64 QIODevicePrivate::readLine(char *data, qint64 maxSize)
|
||||
Reads a line from the device, but no more than \a maxSize characters,
|
||||
and returns the result as a byte array.
|
||||
|
||||
If \a maxSize is 0 or not specified, the line can be of any length,
|
||||
thereby enabling unlimited reading.
|
||||
|
||||
The resulting line can have trailing end-of-line characters ("\n" or "\r\n"),
|
||||
so calling QByteArray::trimmed() may be necessary.
|
||||
|
||||
This function has no way of reporting errors; returning an empty
|
||||
QByteArray can mean either that no data was currently available
|
||||
for reading, or that an error occurred.
|
||||
|
Loading…
x
Reference in New Issue
Block a user