diff options
Diffstat (limited to 'src/corelib/io/qiodevice.cpp')
-rw-r--r-- | src/corelib/io/qiodevice.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp index 43e0f0d..7134ae9 100644 --- a/src/corelib/io/qiodevice.cpp +++ b/src/corelib/io/qiodevice.cpp @@ -1628,10 +1628,11 @@ QString QIODevice::errorString() const \fn qint64 QIODevice::readData(char *data, qint64 maxSize) Reads up to \a maxSize bytes from the device into \a data, and - returns the number of bytes read or -1 if an error occurred. If - there are no bytes to be read, this function should return -1 if - there can never be more bytes available (for example: socket - closed, pipe closed, sub-process finished). + returns the number of bytes read or -1 if an error occurred. + + If there are no bytes to be read and there can never be more bytes + available (examples include socket closed, pipe closed, sub-process + finished), this function returns -1. This function is called by QIODevice. Reimplement this function when creating a subclass of QIODevice. |