summaryrefslogtreecommitdiff
path: root/src/plugins/debugger/qml/qmlcppengine.cpp
diff options
context:
space:
mode:
authorAurindam Jana <aurindam.jana@nokia.com>2012-04-13 17:14:10 +0200
committerKai Koehne <kai.koehne@nokia.com>2012-04-25 11:15:09 +0200
commitfa6817a6fa305162018db54cf7402faef3cf403d (patch)
treea9deb1f83fef36a7fcde93d521a2a637465a8965 /src/plugins/debugger/qml/qmlcppengine.cpp
parent7f1f28211195e907d36e8148eb4148f0f4b9c61e (diff)
downloadqt-creator-fa6817a6fa305162018db54cf7402faef3cf403d.tar.gz
QmlCppEngine: Update Views when switching between engines.
Change-Id: I90958e77c4d8c845ef6e55fe65eaffe0ac24dcc5 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Diffstat (limited to 'src/plugins/debugger/qml/qmlcppengine.cpp')
-rw-r--r--src/plugins/debugger/qml/qmlcppengine.cpp22
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