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

QtSerialPorts misses EV_TXEMPTY in event mask on WIndows

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • None
    • 5.0.0
    • Serial Port
    • None
    • Windows XP, Windows 7 (64 bit)

      On Windows QtSerialPort misses EV_TXEMPTY in event mask. That is why if such an event occures, QtSerialPort will treat it as error. This even is correctly treated on WinCE.

      The solution is to edit qserialport_win.cpp and add the missing event to the originalEventMask.

      In bool QSerialPortPrivate::open(QIODevice::OpenMode mode)

      ...
      if (mode & QIODevice::WriteOnly)

      { desiredAccess |= GENERIC_WRITE; originalEventMask |= EV_TXEMPTY; }

      ...

      Please commit it with reference to my nickname.

      Thanks
      Arokux.

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

            kuzulis Denis Shienkov
            arokux Arokux
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes