summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qiodevice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/io/qiodevice.cpp')
-rw-r--r--src/corelib/io/qiodevice.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
index 7a87a78c60..47484ad596 100644
--- a/src/corelib/io/qiodevice.cpp
+++ b/src/corelib/io/qiodevice.cpp
@@ -666,7 +666,7 @@ bool QIODevice::seek(qint64 pos)
For some devices, atEnd() can return true even though there is more data
to read. This special case only applies to devices that generate data in
direct response to you calling read() (e.g., \c /dev or \c /proc files on
- Unix and Mac OS X, or console input / \c stdin on all platforms).
+ Unix and OS X, or console input / \c stdin on all platforms).
\sa bytesAvailable(), read(), isSequential()
*/
@@ -989,8 +989,8 @@ QByteArray QIODevice::readAll()
// Size is unknown, read incrementally.
qint64 readResult;
do {
- result.resize(result.size() + QIODEVICE_BUFFERSIZE);
- readResult = read(result.data() + readBytes, result.size() - readBytes);
+ result.resize(readBytes + QIODEVICE_BUFFERSIZE);
+ readResult = read(result.data() + readBytes, QIODEVICE_BUFFERSIZE);
if (readResult > 0 || readBytes == 0)
readBytes += readResult;
} while (readResult > 0);