equal
deleted
inserted
replaced
1173 { |
1173 { |
1174 delete _startState; |
1174 delete _startState; |
1175 _startState = 0; |
1175 _startState = 0; |
1176 } |
1176 } |
1177 |
1177 |
|
1178 void QStateMachinePrivate::clearHistory() |
|
1179 { |
|
1180 Q_Q(QStateMachine); |
|
1181 QList<QHistoryState*> historyStates = qFindChildren<QHistoryState*>(q); |
|
1182 for (int i = 0; i < historyStates.size(); ++i) { |
|
1183 QHistoryState *h = historyStates.at(i); |
|
1184 QHistoryStatePrivate::get(h)->configuration.clear(); |
|
1185 } |
|
1186 } |
|
1187 |
1178 void QStateMachinePrivate::_q_start() |
1188 void QStateMachinePrivate::_q_start() |
1179 { |
1189 { |
1180 Q_Q(QStateMachine); |
1190 Q_Q(QStateMachine); |
1181 Q_ASSERT(state == Starting); |
1191 Q_ASSERT(state == Starting); |
1182 Q_ASSERT(rootState() != 0); |
1192 Q_ASSERT(rootState() != 0); |
1184 configuration.clear(); |
1194 configuration.clear(); |
1185 qDeleteAll(internalEventQueue); |
1195 qDeleteAll(internalEventQueue); |
1186 internalEventQueue.clear(); |
1196 internalEventQueue.clear(); |
1187 qDeleteAll(externalEventQueue); |
1197 qDeleteAll(externalEventQueue); |
1188 externalEventQueue.clear(); |
1198 externalEventQueue.clear(); |
|
1199 clearHistory(); |
1189 |
1200 |
1190 #ifdef QSTATEMACHINE_DEBUG |
1201 #ifdef QSTATEMACHINE_DEBUG |
1191 qDebug() << q << ": starting"; |
1202 qDebug() << q << ": starting"; |
1192 #endif |
1203 #endif |
1193 state = Running; |
1204 state = Running; |