forked from qt-creator/qt-creator
QmlCppDebugger: adjusted state changes when one engine fails
reviewed-by: hjk
This commit is contained in:
@@ -126,9 +126,9 @@ void QmlCppEnginePrivate::qmlStackChanged()
|
||||
QmlCppEngine::QmlCppEngine(const DebuggerStartParameters &sp)
|
||||
: DebuggerEngine(sp), d(new QmlCppEnginePrivate(this, sp))
|
||||
{
|
||||
//setStateDebugging(true);
|
||||
//m_cppEngine->setStateDebugging(true);
|
||||
//m_qmlEngine->setStateDebugging(true);
|
||||
// setStateDebugging(true);
|
||||
// d->m_cppEngine->setStateDebugging(true);
|
||||
// d->m_qmlEngine->setStateDebugging(true);
|
||||
}
|
||||
|
||||
QmlCppEngine::~QmlCppEngine()
|
||||
@@ -482,7 +482,10 @@ void QmlCppEngine::slaveEngineStateChanged
|
||||
break;
|
||||
|
||||
case InferiorSetupFailed:
|
||||
notifyInferiorSetupFailed();
|
||||
if (otherEngine->state() == InferiorRunOk)
|
||||
otherEngine->quitDebugger();
|
||||
else
|
||||
notifyInferiorSetupFailed();
|
||||
break;
|
||||
|
||||
case InferiorSetupOk:
|
||||
@@ -497,7 +500,10 @@ void QmlCppEngine::slaveEngineStateChanged
|
||||
break;
|
||||
|
||||
case EngineRunFailed:
|
||||
notifyEngineRunFailed();
|
||||
if (otherEngine->state() == InferiorRunOk)
|
||||
otherEngine->quitDebugger();
|
||||
else
|
||||
notifyEngineRunFailed();
|
||||
break;
|
||||
|
||||
|
||||
@@ -510,9 +516,11 @@ void QmlCppEngine::slaveEngineStateChanged
|
||||
|
||||
case InferiorRunOk:
|
||||
if (state() == EngineRunRequested) {
|
||||
if (otherEngine->state() == InferiorRunOk)
|
||||
if (otherEngine->state() == InferiorRunOk
|
||||
|| otherEngine->state() == InferiorStopOk)
|
||||
notifyEngineRunAndInferiorRunOk();
|
||||
else if (otherEngine->state() == InferiorRunOk)
|
||||
else if (otherEngine->state() == InferiorRunOk
|
||||
|| otherEngine->state() == InferiorStopOk)
|
||||
notifyEngineRunAndInferiorStopOk();
|
||||
else
|
||||
EDEBUG("... WAITING FOR OTHER INFERIOR RUN");
|
||||
@@ -553,6 +561,8 @@ void QmlCppEngine::slaveEngineStateChanged
|
||||
} else if (state() == InferiorStopRequested) {
|
||||
EDEBUG("... AN INFERIOR STOPPED EXPECTEDLY");
|
||||
notifyInferiorStopOk();
|
||||
} else if (state() == EngineRunRequested) {
|
||||
EDEBUG("... AN INFERIOR FAILED STARTUP, OTHER STOPPED EXPECTEDLY");
|
||||
} else {
|
||||
EDEBUG("... AN INFERIOR STOPPED SPONTANEOUSLY");
|
||||
notifyInferiorSpontaneousStop();
|
||||
@@ -581,6 +591,12 @@ void QmlCppEngine::slaveEngineStateChanged
|
||||
otherEngine->quitDebugger();
|
||||
} else if (otherEngine->state() == InferiorStopOk) {
|
||||
otherEngine->quitDebugger();
|
||||
} else if (otherEngine->state() == EngineRunFailed) {
|
||||
EDEBUG("... INFERIOR STOPPED, OTHER ENGINE FAILED");
|
||||
notifyEngineRunFailed();
|
||||
} else if (otherEngine->state() == InferiorSetupFailed) {
|
||||
EDEBUG("... INFERIOR STOPPED, OTHER INFERIOR FAILED");
|
||||
notifyInferiorSetupFailed();
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user