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

State Machine Framework: make UnconditionalTransition public

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Reported
    • Priority: P4: Low
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Core: State Machine
    • Labels:
      None

      Description

      Hi,

      please make UnconditionalTransition publically usable.

      Reference

      Perhaps QUnconditionalTransition, or something.

      Why?
      I think this may be interesting, since one can then do:

      // c++11
      
      QUnconditionalTransition *trans = new QUnconditionalTransition{state};
      
      QObject::connect(checkbox, 
                       &QCheckBox::toggled, 
                       [](bool leaveImmediate) { trans->setTargetState(leaveImmediate ? state : nullptr); } 
                      );
      

      This is an easy way, to conditionally specify

      • to leave a state immediately on entering
      • or not (if TargetState is nullptr).

        Attachments

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

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            nicesw123 nicesw123
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes