Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-27796

QFile read failes to read 4GB files.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Not Evaluated Not Evaluated
    • 5.4.0
    • 4.8.3
    • Core: I/O
    • None
    • Windows 7

      If file to read is over 4GB and bufferSize is big, reading is failed:

      qint64 bufferSize = (qint64)4*1024*1024*1024;
      file.read(tempArray,bufferSize);

      This is because in QFSFileEnginePrivate::nativeRead(char *data, qint64 maxlen), DWORD crops the size:
      DWORD bytesToRead = DWORD(maxlen);

      Reading is succeeded if the bufferSize is smaller.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            laknoll Lars Knoll
            qtcomsupport Qt Support
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes