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

State saved in QHistoryState is persistent between state machine starts/stops

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.6.3
    • 4.6.2
    • Core: State Machine
    • None
    • c1e23f855826942d7d3821a944c35272d9ecffb4

    Description

      Let's say that my QStateMachine have a structure depicted by the machine.gif image in the attachment. The transitions flow inside this machine goes like this:

      1. actions
      2. actionsHistory
      3. initializeActions (default state for actionsHistory)
      4. doActions
      5. interrupt (after QEvent::User)
      6. actions
      7. actionsHistory
      8. doActions (was an active state last time the actions were exited).

      If I stop the machine and start it again, the transitions are different: machine doesn't go to initializeActions state, it jumps straight to doActions instead. It means that history of QHistoryState is not cleared on machine restart. I expected the QStateMachine::start() method to completely reset configuration of state machine, ensuring that given set of input generates the same transition flow every time the machine is run.

      I've attached the test case that reproduces the issue.

      Attachments

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

        Activity

          People

            kenthans Kent Hansen (Inactive)
            chalup Jerzy Chalupski
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes