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

QStateMachine: Error States are insufficiently explained

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.15.1
    • Fix Version/s: None
    • Labels:
      None
    • Platform/s:
      All

      Description

      The documentation is not explicit about the fact that error states are only entered for errors of state machine consistency according to the SCXML model, i.e. they are not intended to represent errors at the business logic level (like a DownloadFailedState).
      The only information about this fact is in the documentation of the enum QStateMachine::Error. So, to realize what is going on, one has to read the documentation of QState::errorState(), QStateMachine::error(), and QStateMachine::Error, and understand how QState::errorState() relates to QStateMachine::error().
      I am currently dealing with a state machine (which I didn't write) that doesn't handle errors correctly due to this confusion...

      The best coherent explanation of the meaning of the error states is in https://doc.qt.io/qt-5/qstatemachine.html#details and that is really not very clear.

      So I think this needs both a better overview documentation and better references to and / or summaries of the overview in the documentation of the details.

        Attachments

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

          Activity

            People

            Assignee:
            thiago Thiago Macieira
            Reporter:
            ahartmetz Andreas Hartmetz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes