| 81 | } |
| 82 | |
| 83 | QModelIndex StateModelPrivate::indexForState(State state) const |
| 84 | { |
| 85 | if (!m_stateMachine) |
| 86 | return {}; |
| 87 | |
| 88 | if (state == m_stateMachine->rootState()) |
| 89 | return QModelIndex(); |
| 90 | |
| 91 | Q_Q(const StateModel); |
| 92 | State parentState = m_stateMachine->parentState(state); |
| 93 | int row = m_stateMachine->stateChildren(parentState).indexOf(state); |
| 94 | if (row == -1) |
| 95 | return QModelIndex(); |
| 96 | return q->index(row, 0, indexForState(parentState)); |
| 97 | } |
| 98 | |
| 99 | void StateModelPrivate::stateConfigurationChanged() |
| 100 | { |
nothing calls this directly
no test coverage detected