diff options
author | David Boddie <david.boddie@nokia.com> | 2011-02-17 18:02:44 (GMT) |
---|---|---|
committer | David Boddie <david.boddie@nokia.com> | 2011-02-17 18:02:44 (GMT) |
commit | 5e1927288d1bcdf4fa597985f1c15655a9922a4d (patch) | |
tree | 63ab1e6474d23b351d90c861d6ccbec0a7f8b818 /src/corelib/io | |
parent | 9bfdcaa2a727ca59c4a5136000ce13223ce87b5e (diff) | |
download | Qt-5e1927288d1bcdf4fa597985f1c15655a9922a4d.zip Qt-5e1927288d1bcdf4fa597985f1c15655a9922a4d.tar.gz Qt-5e1927288d1bcdf4fa597985f1c15655a9922a4d.tar.bz2 |
Doc: Clarified the -1 return value of QIODevice::readData().
Diffstat (limited to 'src/corelib/io')
-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. |