| 97 | } |
| 98 | |
| 99 | void 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 | |
| 119 | void StateModelPrivate::handleMachineDestroyed(QObject *) |
| 120 | { |
no test coverage detected