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

QSerialPort::waitForReadyRead should call startAsyncWrite on Windows

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 5.3.1
    • Fix Version/s: 5.3.2
    • Component/s: Serial Port
    • Labels:
      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

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

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes