MCPcopy Create free account
hub / github.com/KDAB/GammaRay / stateConfigurationChanged

Method stateConfigurationChanged

plugins/statemachineviewer/statemodel.cpp:99–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99void StateModelPrivate::stateConfigurationChanged()
100{
101 QVector<State> newConfig = m_stateMachine->configuration();
102 // states which became active
103 QVector<State> difference;
104 std::set_difference(newConfig.begin(), newConfig.end(),
105 m_lastConfiguration.begin(), m_lastConfiguration.end(),
106 std::back_inserter(difference));
107 for (State state : std::as_const(difference))
108 emitDataChangedForState(state);
109 // states which became inactive
110 difference.clear();
111 std::set_difference(m_lastConfiguration.begin(), m_lastConfiguration.end(),
112 newConfig.begin(), newConfig.end(),
113 std::back_inserter(difference));
114 for (State state : std::as_const(difference))
115 emitDataChangedForState(state);
116 m_lastConfiguration = std::move(newConfig);
117}
118
119void StateModelPrivate::handleMachineDestroyed(QObject *)
120{

Callers 1

setStateMachineMethod · 0.45

Calls 4

endMethod · 0.80
configurationMethod · 0.45
beginMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected