forked from qt-creator/qt-creator
QmlCppEngine: Call quitDebugger already in InferiorShutdownRequested
Doing it in (CppEngine) EngineShutdownOk will result in a write to an already closed socket. Change-Id: Ie9712f33d57348ecb27e31eaeb44f42f159a400c Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
This commit is contained in:
@@ -684,6 +684,7 @@ void QmlCppEngine::slaveEngineStateChanged
|
|||||||
|| state() == InferiorStopOk, qDebug() << state());
|
|| state() == InferiorStopOk, qDebug() << state());
|
||||||
if (state() == InferiorStopOk)
|
if (state() == InferiorStopOk)
|
||||||
setState(InferiorShutdownRequested);
|
setState(InferiorShutdownRequested);
|
||||||
|
qmlEngine()->quitDebugger();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case InferiorShutdownFailed: {
|
case InferiorShutdownFailed: {
|
||||||
@@ -703,7 +704,6 @@ void QmlCppEngine::slaveEngineStateChanged
|
|||||||
case EngineShutdownRequested: {
|
case EngineShutdownRequested: {
|
||||||
// set by queueShutdownEngine()
|
// set by queueShutdownEngine()
|
||||||
QTC_ASSERT(state() == EngineShutdownRequested, qDebug() << state());
|
QTC_ASSERT(state() == EngineShutdownRequested, qDebug() << state());
|
||||||
qmlEngine()->quitDebugger();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EngineShutdownFailed: {
|
case EngineShutdownFailed: {
|
||||||
@@ -741,11 +741,12 @@ void QmlCppEngine::slaveEngineStateChanged
|
|||||||
}
|
}
|
||||||
|
|
||||||
QTC_ASSERT(state() == InferiorRunOk
|
QTC_ASSERT(state() == InferiorRunOk
|
||||||
|| state() == InferiorStopRequested, qDebug() << state());
|
|| state() == InferiorStopRequested
|
||||||
|
|| state() == InferiorShutdownRequested, qDebug() << state());
|
||||||
|
|
||||||
if (state() == InferiorRunOk)
|
if (state() == InferiorRunOk)
|
||||||
notifyInferiorSpontaneousStop();
|
notifyInferiorSpontaneousStop();
|
||||||
else
|
else if (state() == InferiorStopRequested)
|
||||||
notifyInferiorStopOk();
|
notifyInferiorStopOk();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user