Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default transition targetstate to transition configName #1213

Merged
merged 2 commits into from
Aug 21, 2019

Conversation

PiZZAD0X
Copy link

@PiZZAD0X PiZZAD0X commented Aug 21, 2019

When merged this pull request will:

  • Change the default transition targetstate value to the transition configName, so that most transitions between states can have their transition state and targetstate defined without a near duplicate entry.

Example:

class Init {
    onStateEntered = QFUNC(onCacheInit);
    class Cache {
        targetState = "Cache";
        events[] = {QGVAR(cache)};
    };

    class Uncache {
        targetState = "Uncache";
        events[] = {QGVAR(uncache)};
    };
};

Could now be written as:

class Init {
    onStateEntered = QFUNC(onCacheInit);
    class Cache {
        events[] = {QGVAR(cache)};
    };

    class Uncache {
        events[] = {QGVAR(uncache)};
    };
};

while targetState 's that deviate from the transition configName are supported.

Copy link
Contributor

@commy2 commy2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@commy2 commy2 added this to the 3.13 milestone Aug 21, 2019
@BaerMitUmlaut
Copy link
Contributor

Sure why not.

@commy2 commy2 merged commit 1ccbafa into CBATeam:master Aug 21, 2019
@commy2 commy2 modified the milestones: 3.13, 3.12.2 Sep 8, 2019
@PiZZAD0X PiZZAD0X deleted the statemachineDefaultTargetState branch March 24, 2020 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants