summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qiodevice.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
index 3e3ee6e406..66274e8115 100644
--- a/src/corelib/io/qiodevice.cpp
+++ b/src/corelib/io/qiodevice.cpp
@@ -1320,12 +1320,17 @@ QByteArray QIODevice::readAll()
newline will not be inserted into the buffer. On windows newline
characters are replaced with '\\n'.
+ Note that on sequential devices, data may not be immediately available,
+ which may result in a partial line being returned. By calling the
+ canReadLine() function before reading, you can check whether a complete
+ line (including the newline character) can be read.
+
This function calls readLineData(), which is implemented using
repeated calls to getChar(). You can provide a more efficient
implementation by reimplementing readLineData() in your own
subclass.
- \sa getChar(), read(), write()
+ \sa getChar(), read(), canReadLine(), write()
*/
qint64 QIODevice::readLine(char *data, qint64 maxSize)
{