From aea71e2e02fa966842b094244bc3f5fc88f50f41 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 14 Apr 2010 12:56:33 +0200 Subject: Fix autotest failure: QIODevice::read() on a closed device must return -1 --- src/corelib/io/qiodevice.cpp | 1 + 1 file changed, 1 insertion(+) 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", -- cgit v0.12