summaryrefslogtreecommitdiff
path: root/src/corelib
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-04-14 12:56:33 +0200
committerThiago Macieira <thiago.macieira@nokia.com>2010-04-14 13:00:01 +0200
commitaea71e2e02fa966842b094244bc3f5fc88f50f41 (patch)
treeb526b276b66844bfebb5d796a0c554c9f29d3fae /src/corelib
parent00f01532342713e4adae0ce8ccd332829acfeec0 (diff)
Fix autotest failure: QIODevice::read() on a closed device must return -1
Diffstat (limited to 'src/corelib')
-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 f83c1423f8..f2cef4e156 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",