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

QSerialPort::waitForReadyRead should call startAsyncWrite on Windows

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.3.2
    • 5.3.1
    • Serial Port
    • None

    Description

      If, within a slot in the same event loop that manages a QSerialPort instance, an application calls write followed by waitForReadyRead, the async write operation will not get started until waitForReadyRead returns (possibly never if using infinite timeout). This is because the slot connected to the QTimer timeout signal never gets executed.

      If, however, the application calls waitForBytesWritten between the call to write and waitForReadyRead, the async write operation will get started (since waitForBytesWritten calls startAsyncWrite).

      A simple fix is to call startAsyncWrite inside waitForReadyRead (and possibly in other blocking operations).

      Attachments

        Activity

          People

            kuzulis Denis Shienkov
            pnoffke Patrick Noffke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: