QmlCppEngine: Fix cpp bp insertion when debugging QML

The cpp slave will be interrupted when inserting breakpoints.
Track in this case the cpp engine state until it's running again.

Task-number: QTCREATORBUG-7230
Change-Id: I4cf275916d8f0581916d95f2f440ea12358aeeeb
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
This commit is contained in:
Kai Koehne
2012-04-10 11:57:00 +02:00
committed by Aurindam Jana
parent a751e447bc
commit 56e17e53c2

View File

@@ -587,6 +587,13 @@ void QmlCppEngine::slaveEngineStateChanged
notifyEngineRunAndInferiorRunOk();
else if (state() == InferiorRunRequested)
notifyInferiorRunOk();
if (qmlEngine()->state() == InferiorStopOk) {
// track qml engine again
setState(InferiorStopRequested);
notifyInferiorStopOk();
d->m_activeEngine = qmlEngine();
}
break;
}
case InferiorRunFailed: {
@@ -601,9 +608,8 @@ void QmlCppEngine::slaveEngineStateChanged
|| state() == InferiorRunOk, qDebug() << state());
if (state() == InferiorRunOk)
setState(InferiorStopRequested);
break;
} else {
// we're debugging qml, but got an abort ...
// we're debugging qml, but got an interrupt, or abort
QTC_ASSERT(state() == InferiorRunOk
|| state() == InferiorStopOk
|| state() == InferiorRunRequested, qDebug() << state());
@@ -618,8 +624,10 @@ void QmlCppEngine::slaveEngineStateChanged
notifyInferiorRunOk();
setState(InferiorStopRequested);
}
// now track cpp engine
d->m_activeEngine = cppEngine();
}
break;
}
case InferiorStopOk: {
if (isDying()) {