diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-22 16:00:11 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-22 16:00:11 (GMT) |
commit | 152c2e47eba67d7f9f1aefe4ab45c40592716c90 (patch) | |
tree | e8c43db915cf827157a14d22281eecdb9da90bc7 /src/corelib/io | |
parent | 1c47be7174ca1e9ed393a12461742975079710d7 (diff) | |
parent | 27f566fb608d9465110dc67d16fe8f88ee9d4a0a (diff) | |
download | Qt-152c2e47eba67d7f9f1aefe4ab45c40592716c90.zip Qt-152c2e47eba67d7f9f1aefe4ab45c40592716c90.tar.gz Qt-152c2e47eba67d7f9f1aefe4ab45c40592716c90.tar.bz2 |
Merge branch 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration into 4.7-integration
* 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration: (71 commits)
Revert "Attempt at fixing compile failure introduced by 4.6 merge in qpaintengine_vg.cpp"
Attempt at fixing compile failure introduced by 4.6 merge in qpaintengine_vg.cpp
Fixing the wrong QUrl usage
When on Symbian use smaller files.
correctly position glyphs for complex languages
Removed inneccessary QGlyphLayout::offsets initialization.
Fix mirrored characters for RTL text in Symbian
QNAM: Add a code comment related to the cache
tst_QSystemSemaphore::processes fixed for WinCE
tst_qsystemsemaphore: fix deployment of lackey.exe for WinCE
tst_qsharedmemory: create multiple instances of lackey.exe on WinCE
tst_qsharedmemory: fix deployment of lackey.exe for WinCE
fix compilation of tst_sharedmemory on Windows CE
QtScript: regression with instanceof operator for QMetaObject wrappers
examples/widgets/stylesheet fix mainwindow.ui
QStyleSheetStyle: fix memory leak on base style change
QNAM HTTP: Fixed a bug when getting empty files with pipelining
Fix window transparency on Symbian.
Tweak the 'normalGeometry' of the widget before setting it.
Use QDesktopWidget as a status pane observer on Symbian.
...
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qiodevice.cpp | 13 |
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 |