src/corelib/io/qiodevice.cpp
changeset 25 e24348a560a6
parent 23 89e065397ea6
child 33 3e2da88830cd
equal deleted inserted replaced
23:89e065397ea6 25:e24348a560a6
   808                     d->pPos = &d->seqDumpPos;
   808                     d->pPos = &d->seqDumpPos;
   809                     d->pDevicePos = &d->seqDumpPos;
   809                     d->pDevicePos = &d->seqDumpPos;
   810                 }
   810                 }
   811             }
   811             }
   812 
   812 
       
   813             if (!maxSize)
       
   814                 return readSoFar;
       
   815 
   813             if ((d->openMode & Unbuffered) == 0 && maxSize < QIODEVICE_BUFFERSIZE) {
   816             if ((d->openMode & Unbuffered) == 0 && maxSize < QIODEVICE_BUFFERSIZE) {
   814                 // In buffered mode, we try to fill up the QIODevice buffer before
   817                 // In buffered mode, we try to fill up the QIODevice buffer before
   815                 // we do anything else.
   818                 // we do anything else.
   816                 // buffer is empty at this point, try to fill it
   819                 // buffer is empty at this point, try to fill it
   817                 int bytesToBuffer = QIODEVICE_BUFFERSIZE;
   820                 int bytesToBuffer = QIODEVICE_BUFFERSIZE;