Debugger: Avoid some undesired state transitions on shutdown

Seeing an ill engine while trying to stop means that the stop failed.
Also, a finished master engine doesn't need further updates.

Task-number: QTCREATORBUG-14089
Change-Id: Icd5b090dfcdc0875953d8756a909b1405e05f71f
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
hjk
2015-03-05 15:21:00 +01:00
parent 9e0a27207c
commit 68807bdde1
2 changed files with 7 additions and 0 deletions

View File

@@ -1139,6 +1139,8 @@ void DebuggerEngine::notifyEngineIll()
interruptInferior(); interruptInferior();
break; break;
case InferiorStopRequested: case InferiorStopRequested:
notifyInferiorStopFailed();
break;
case InferiorStopOk: case InferiorStopOk:
showMessage(_("FORWARDING STATE TO InferiorShutdownFailed")); showMessage(_("FORWARDING STATE TO InferiorShutdownFailed"));
setState(InferiorShutdownFailed, true); setState(InferiorShutdownFailed, true);

View File

@@ -492,6 +492,11 @@ void QmlCppEngine::slaveEngineStateChanged
EDEBUG(" COMBINED ENGINE: " << this << state() << isDying()); EDEBUG(" COMBINED ENGINE: " << this << state() << isDying());
} }
if (state() == DebuggerFinished) {
// We are done and don't care about slave state changes anymore.
return;
}
// Idea is to follow the state of the cpp engine, except where we are stepping in QML. // Idea is to follow the state of the cpp engine, except where we are stepping in QML.
// That is, when the QmlEngine moves between InferiorStopOk, and InferiorRunOk, InferiorStopOk ... // That is, when the QmlEngine moves between InferiorStopOk, and InferiorRunOk, InferiorStopOk ...
// //