diff options
Diffstat (limited to 'src/plugins/debugger/qml/qmlcppengine.cpp')
-rw-r--r-- | src/plugins/debugger/qml/qmlcppengine.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/plugins/debugger/qml/qmlcppengine.cpp b/src/plugins/debugger/qml/qmlcppengine.cpp index 62b7c1f3a0..051243153a 100644 --- a/src/plugins/debugger/qml/qmlcppengine.cpp +++ b/src/plugins/debugger/qml/qmlcppengine.cpp @@ -120,7 +120,7 @@ QmlCppEngine::QmlCppEngine(const DebuggerStartParameters &sp, *errorMessage = tr("The slave debugging engine required for combined QML/C++-Debugging could not be created: %1").arg(*errorMessage); return; } - d->m_activeEngine = d->m_cppEngine; + setActiveEngine(d->m_cppEngine); } QmlCppEngine::~QmlCppEngine() @@ -425,7 +425,7 @@ bool QmlCppEngine::evaluateScriptExpression(const QString &expression) void QmlCppEngine::setupEngine() { EDEBUG("\nMASTER SETUP ENGINE"); - d->m_activeEngine = d->m_cppEngine; + setActiveEngine(d->m_cppEngine); d->m_qmlEngine->setupSlaveEngine(); d->m_cppEngine->setupSlaveEngine(); @@ -592,7 +592,7 @@ void QmlCppEngine::slaveEngineStateChanged // track qml engine again setState(InferiorStopRequested); notifyInferiorStopOk(); - d->m_activeEngine = qmlEngine(); + setActiveEngine(d->m_qmlEngine); } break; } @@ -625,7 +625,7 @@ void QmlCppEngine::slaveEngineStateChanged setState(InferiorStopRequested); } // now track cpp engine - d->m_activeEngine = cppEngine(); + setActiveEngine(d->m_cppEngine); } break; } @@ -637,7 +637,7 @@ void QmlCppEngine::slaveEngineStateChanged || state() == InferiorStopOk, qDebug() << state()); // Just to make sure, we're shutting down anyway ... - d->m_activeEngine = cppEngine(); + setActiveEngine(d->m_cppEngine); if (state() == InferiorStopRequested) setState(InferiorStopOk); @@ -645,7 +645,7 @@ void QmlCppEngine::slaveEngineStateChanged } else { if (d->m_activeEngine != cppEngine()) { showStatusMessage(tr("C++ debugger activated")); - d->m_activeEngine = cppEngine(); + setActiveEngine(d->m_cppEngine); } QTC_ASSERT(state() == InferiorStopRequested @@ -737,7 +737,7 @@ void QmlCppEngine::slaveEngineStateChanged EDEBUG("... QML ENGINE STOPPED DURING SHUTDOWN "); // Just to make sure, we're shutting down anyway ... - d->m_activeEngine = cppEngine(); + setActiveEngine(d->m_cppEngine); if (state() == InferiorStopRequested) notifyInferiorStopOk(); @@ -745,7 +745,7 @@ void QmlCppEngine::slaveEngineStateChanged } else { if (d->m_activeEngine != qmlEngine()) { showStatusMessage(tr("QML debugger activated")); - d->m_activeEngine = qmlEngine(); + setActiveEngine(d->m_qmlEngine); } QTC_ASSERT(state() == InferiorRunOk @@ -821,6 +821,12 @@ DebuggerEngine *QmlCppEngine::qmlEngine() const return d->m_qmlEngine; } +void QmlCppEngine::setActiveEngine(DebuggerEngine *engine) +{ + d->m_activeEngine = engine; + updateViews(); +} + } // namespace Internal } // namespace Debugger |