Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QSerialPort::sendBreak() is deprecated but no alternative is proposed
Forum Updated to NodeBB v4.3 + New Features

QSerialPort::sendBreak() is deprecated but no alternative is proposed

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 2 Posters 1.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mark81
    wrote on last edited by aha_1980
    #1

    The subject is self-explanatory: the official docs states the sendBreak() function is deprecated but they don't propose an alternative. How do they suppose we can send a break now?

    Edit: @aha_1980 corrected link

    aha_1980A 1 Reply Last reply
    0
    • M Mark81

      The subject is self-explanatory: the official docs states the sendBreak() function is deprecated but they don't propose an alternative. How do they suppose we can send a break now?

      Edit: @aha_1980 corrected link

      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Mark81 Out of curiosity, for what do you need this function?

      Qt has to stay free or it will die.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Mark81
        wrote on last edited by Mark81
        #3

        For example to generate a DMX-512 signal.
        But, generally speaking, if something becomes obsolete or deprecated one should know how to do the same thing with the newer functions. At least, IMHO.

        aha_1980A 1 Reply Last reply
        0
        • M Mark81

          For example to generate a DMX-512 signal.
          But, generally speaking, if something becomes obsolete or deprecated one should know how to do the same thing with the newer functions. At least, IMHO.

          aha_1980A Offline
          aha_1980A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Mark81

          The commit that deprecated the function contains the following message:

          Improve usage of the break state for the Tx line

          1. Now the sendBreak() method is deprecated since it is blocking and
            impossible to implement same behavior on different platforms using
            their API's. Besides, this method can be implemented via
            setBreakEnabled() and QTimer.
          1. Introduced the new property named as "breakEnabled" which consist
            of setBreakEnabled() and isBreakEnabled() methods and the signal
            breakEnabledChanged().

          Note: After opening, the port always is in non-break state.

          So it seems setBreakEnabled() is the function to use now.

          Qt has to stay free or it will die.

          1 Reply Last reply
          2
          • M Offline
            M Offline
            Mark81
            wrote on last edited by
            #5

            Thank you. I didn't searched for the commit, just relied on the documentation. Next time I'll try to do that.

            aha_1980A 1 Reply Last reply
            0
            • M Mark81

              Thank you. I didn't searched for the commit, just relied on the documentation. Next time I'll try to do that.

              aha_1980A Offline
              aha_1980A Offline
              aha_1980
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Mark81

              Well, maybe the sentence "This function is deprecated" could be "This function is deprecated. Use xxx instead".

              But at least, at the end of the sendBreak() chapter, there is a "see also" link to setBreakEnabled().

              Regards

              Qt has to stay free or it will die.

              1 Reply Last reply
              2

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved