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

QStateMachine: Error States are insufficiently explained



    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.15.1
    • None
    • All


      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.


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



            thiago Thiago Macieira
            ahartmetz Andreas Hartmetz
            0 Vote for this issue
            1 Start watching this issue



              Gerrit Reviews

                There are no open Gerrit changes