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

QState entered/exited signals are not emmited after a history state

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.2.1
    • Fix Version/s: None
    • Component/s: Core: State Machine
    • Labels:
      None
    • Environment:
      Windows 7 64bits

      Description

      After a QHistory state in mode "DeepHistory", signals entered/exit and functions onEntry/onExit are not called for all states on the path from HistoryState to the previous saved state.

      Here an example :

      QState* s1 = new QState();
      QState* sPause = new QState();
      
      m_stateMachine->addState(s1);
      m_stateMachine->addState(sPause);
      
      
      QState* s11 = new QState(s1);
      QState* s111 = new QState(s11);
      QState* s112 = new QState(s11);
      s11->setInitialState(s111);
      s111->addTransition(s112);
      
      
      QHistoryState* l_hist = new QHistoryState(QHistoryState::HistoryType::DeepHistory, s1);
      l_hist->setDefaultState(s11);
      
      s1->setInitialState(s11);
      
      m_stateMachine->setInitialState(s1);
      
      s11->addTransition(this, SIGNAL(togglePause()), sPause);
      
      sPause->addTransition(this, SIGNAL(toggleResume()), l_hist);
      

      Enter s1
      ___Enter s11
      ______Enter s111
      ______Exit s111
      ______Enter s112
      toggle Pause
      ______Exit s112
      ___Exit s11
      Exit s1
      Enter sPause
      toggle Resume
      Exit sPause
      Enter s1
      ___Enter s11 Missing
      ______Enter s112
      toggle Pause
      ______Exit s112
      ___Exit s11 Missing
      Exit s1
      Enter sPause

        Attachments

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

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            arnaud Arnaud PIERRE
            Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes