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

QIODevice calls readData twice for an unbuffered open mode

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.0.2
    • 5.0.0
    • Core: I/O, Documentation
    • None
    • 5221ae5f424f24000d877d2a4394e2d75a052cca

    Description

      I try to port an application from qt 4.8 to 5.0. And the implementation of QIODevice::read(char *data, qint64 maxSize) has changed. I call read with maxSize = 1 to my IODevice (read/write/unbuffered) and in my subclass readData is called twice. First call is ok (with readData(data, 1)), second call is called with readData(data, 0). caused by line 923 of qiodevice.cpp. With the second call my IODevice (Pipe under Windows hangs).

      Is the second call for a unbuffered IODevice a bug or feature?

      Attachments

        For Gerrit Dashboard: QTBUG-28968
        # Subject Branch Project Status CR V

        Activity

          People

            stromme Christian
            tommyadam Thomas Adam
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes