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

QState does not support setting the initial state to a "deep" state

    XMLWordPrintable

Details

    • Bug
    • Status: Reported
    • P3: Somewhat important
    • Resolution: Unresolved
    • 5.4.2, 5.5.0 Beta
    • None
    • Core: State Machine
    • None

    Description

      QState (and therefore also QStateMachine) want the initial state to be a direct decendant of itself. For example:

      QState a;
        QState b(&a);
          QState c(&b);
      a.setInitialState(&c); // WARNING: state 0x123 is not a child of this state (0x456)
      

      There is noting preventing a "deep" state as the initial state. The state machine will then enter both b and c whenever a is entered. The check should be changed to see if the initial state has the current state as an ancestor, and not as a direct parent.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            erikv Erik Verbruggen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes