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

PATCH for QSerialPortPrivate::flush() in unix

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 5.3.0
    • 5.3.0 Beta1
    • Serial Port
    • None
    • 2360c401ae2012ed1b5a2b470a088cbbdb0d7f27

    Description

      Flush do not work well in unix. Change this line of code to make it work. A Flush should not start a AsyncWrite, is supposed to "completeAsyncWrite".

      diff --git a/src/serialport/qserialport_unix.cpp b/src/serialport/qserialport_unix.cpp
      index d99575f..8c21b39 100644
      --- a/src/serialport/qserialport_unix.cpp
      +++ b/src/serialport/qserialport_unix.cpp
      @@ -405,7 +405,7 @@ bool QSerialPortPrivate::setRequestToSend(bool set)
       
       bool QSerialPortPrivate::flush()
       {
      -    return startAsyncWrite()
      +    return completeAsyncWrite()
       #ifndef Q_OS_ANDROID
                   && (::tcdrain(descriptor) != -1);
       #else
      

      My application works in 5.2.1. In a commit applied a patch for the asynchronous write, but when my app to a flush data buffer is not sent.

      https://qt.gitorious.org/qt/qtserialport/commit/21f50498f7558e59bca8789e94c0fe5d14a9e27d

      Thank you very much, check the error and patch please.

      Attachments

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

        Activity

          People

            lpapp Laszlo Papp
            kijamve Kijam Lopez
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes