forked from qt-creator/qt-creator
QmlCppEngine: State Transitions
Ensure proper state transitions of the slave engines. Change-Id: I875543f4d547fccf5df30b78a071e1c3d3d7f18f Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
committed by
Kai Koehne
parent
cc3efc47f2
commit
9ebec701c5
@@ -658,9 +658,8 @@ void QmlCppEngine::slaveEngineStateChanged
|
||||
break;
|
||||
}
|
||||
case InferiorExitOk: {
|
||||
// State can be reached by different states ...
|
||||
qmlEngine()->quitDebugger();
|
||||
notifyInferiorExited();
|
||||
// InferiorExitOk will be called through notifyInferiorExited
|
||||
// when InferiorShutDownOk is reached
|
||||
break;
|
||||
}
|
||||
case InferiorShutdownRequested: {
|
||||
@@ -677,11 +676,12 @@ void QmlCppEngine::slaveEngineStateChanged
|
||||
break;
|
||||
}
|
||||
case InferiorShutdownOk: {
|
||||
QTC_ASSERT(state() == InferiorShutdownRequested
|
||||
|| state() == EngineRunFailed
|
||||
|| state() == InferiorSetupFailed, qDebug() << state());
|
||||
if (state() == InferiorShutdownRequested)
|
||||
notifyInferiorShutdownOk();
|
||||
else {
|
||||
// we got InferiorExitOk before, but ignored it ...
|
||||
notifyInferiorExited();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case EngineShutdownRequested: {
|
||||
@@ -740,7 +740,8 @@ void QmlCppEngine::slaveEngineStateChanged
|
||||
notifyInferiorRunOk();
|
||||
}
|
||||
} else if (newState == EngineRunFailed) {
|
||||
d->m_cppEngine->quitDebugger();
|
||||
if (d->m_cppEngine->targetState() != DebuggerFinished)
|
||||
d->m_cppEngine->quitDebugger();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user