summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-05-04 12:10:00 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-05-04 12:10:00 (GMT)
commit3cd611df87645df05fcc747ebb5dcebff05132e4 (patch)
treec171f7497d26977f9e73f1e267b82e600eb98283 /src/corelib/io
parentbea0a4195bcd641a05ae7195cf319590a254b876 (diff)
parent2c4a5cee336aba5f2da52ac4c59b502cf4d82164 (diff)
downloadQt-3cd611df87645df05fcc747ebb5dcebff05132e4.zip
Qt-3cd611df87645df05fcc747ebb5dcebff05132e4.tar.gz
Qt-3cd611df87645df05fcc747ebb5dcebff05132e4.tar.bz2
Merge branch 'qt-master-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration into master-integration
* 'qt-master-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration: (166 commits) Fix the include header <qstring.h> -> <QtCore/qstring.h> bye bye QMakeProjectEnv short-cut evaluation inside if() tests eliminate special splitting of INCLUDEPATH and DEPENDPATH do not env-expand cache file path s/QMAKE_FRAMEWORKDIR_FLAGS/QMAKE_FRAMEWORKPATH_FLAGS/ s/INCPATH/INCLUDEPATH/ s/QMAKE_RPATH/QMAKE_LFLAGS_RPATH/ teach configure QMAKE_LFLAGS_RPATH (in addition to obsolete QMAKE_RPATH) warn about usage of deprecated variables warn about using non-lowercased replace $$function()s add -Wdeprecated option (on by default) make QMakeProject::isEmpty() consider legacy mappings document some functions' scope fix $$size() not using function-scoped variables doc: Fixed some qdoc errors. qdoc: Added breadcrumbs for namespaces. Autotest: check that we receive key events on toplevel widgets Cocoa: key events stopped working Fix desktopservices demo missing icon in Symbian ...
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qiodevice.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
index f2cef4e1..bb11d6b 100644
--- a/src/corelib/io/qiodevice.cpp
+++ b/src/corelib/io/qiodevice.cpp
@@ -755,7 +755,6 @@ 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",
@@ -786,13 +785,13 @@ qint64 QIODevice::read(char *data, qint64 maxSize)
do {
// Try reading from the buffer.
int lastReadChunkSize = d->buffer.read(data, maxSize);
- *d->pPos += lastReadChunkSize;
- readSoFar += lastReadChunkSize;
- // fast exit when satisfied by buffer
- if (lastReadChunkSize == maxSize && !(d->openMode & Text))
- return readSoFar;
-
if (lastReadChunkSize > 0) {
+ *d->pPos += lastReadChunkSize;
+ readSoFar += lastReadChunkSize;
+ // fast exit when satisfied by buffer
+ if (lastReadChunkSize == maxSize && !(d->openMode & Text))
+ return readSoFar;
+
data += lastReadChunkSize;
maxSize -= lastReadChunkSize;
#if defined QIODEVICE_DEBUG