summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-04-14 10:56:33 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-04-14 11:00:01 (GMT)
commitaea71e2e02fa966842b094244bc3f5fc88f50f41 (patch)
treeb526b276b66844bfebb5d796a0c554c9f29d3fae /src/corelib/io
parent00f01532342713e4adae0ce8ccd332829acfeec0 (diff)
downloadQt-aea71e2e02fa966842b094244bc3f5fc88f50f41.zip
Qt-aea71e2e02fa966842b094244bc3f5fc88f50f41.tar.gz
Qt-aea71e2e02fa966842b094244bc3f5fc88f50f41.tar.bz2
Fix autotest failure: QIODevice::read() on a closed device must return -1
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qiodevice.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
index f83c142..f2cef4e1 100644
--- a/src/corelib/io/qiodevice.cpp
+++ b/src/corelib/io/qiodevice.cpp
@@ -755,6 +755,7 @@ qint64 QIODevice::bytesToWrite() const
qint64 QIODevice::read(char *data, qint64 maxSize)
{
Q_D(QIODevice);
+ CHECK_READABLE(read, qint64(-1));
#if defined QIODEVICE_DEBUG
printf("%p QIODevice::read(%p, %d), d->pos = %d, d->buffer.size() = %d\n",