diff options
author | hjk <hjk@qt.io> | 2017-05-19 11:54:13 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2017-05-19 09:56:49 +0000 |
commit | 36ec37b29d22a5128d1ab088a73d6b5237ac56f5 (patch) | |
tree | b77ce0890d9172902d44470dff93e942d324850e /src/plugins/debugger/qml/qmlcppengine.cpp | |
parent | 5e84af54a07e36f5be9dba1f4ba9bb15e701a354 (diff) | |
download | qt-creator-36ec37b29d22a5128d1ab088a73d6b5237ac56f5.tar.gz |
Debugger: Streamline ramping down
There were only two used target states, and in case of mixed
debugging all parts of the machinery better agree on the
direction. So one bool in the (shared) runTool is sufficient.
Change-Id: Iffbf1651b82dde707cfc37d8da9d3da573b34b76
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/debugger/qml/qmlcppengine.cpp')
-rw-r--r-- | src/plugins/debugger/qml/qmlcppengine.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/plugins/debugger/qml/qmlcppengine.cpp b/src/plugins/debugger/qml/qmlcppengine.cpp index 11d04e219b..a678a71ea3 100644 --- a/src/plugins/debugger/qml/qmlcppengine.cpp +++ b/src/plugins/debugger/qml/qmlcppengine.cpp @@ -68,7 +68,7 @@ QmlCppEngine::QmlCppEngine(DebuggerEngine *cppEngine, bool useTerminal) m_qmlEngine->setMasterEngine(this); m_cppEngine = cppEngine; m_cppEngine->setMasterEngine(this); - setActiveEngine(m_cppEngine); + m_activeEngine = m_cppEngine; } QmlCppEngine::~QmlCppEngine() @@ -271,11 +271,6 @@ void QmlCppEngine::assignValueInDebugger(WatchItem *item, void QmlCppEngine::notifyInferiorIll() { - //This will eventually shutdown the engine - //Set final state to avoid quitDebugger() being called - //after this call - setTargetState(DebuggerFinished); - //Call notifyInferiorIll of cpp engine //as qml engine will follow state transitions //of cpp engine @@ -378,7 +373,7 @@ void QmlCppEngine::executeDebuggerCommand(const QString &command, DebuggerLangua void QmlCppEngine::setupEngine() { EDEBUG("\nMASTER SETUP ENGINE"); - setActiveEngine(m_cppEngine); + m_activeEngine = m_cppEngine; m_qmlEngine->setupSlaveEngine(); m_cppEngine->setupSlaveEngine(); @@ -474,6 +469,7 @@ void QmlCppEngine::slaveEngineStateChanged DebuggerEngine *otherEngine = (slaveEngine == m_cppEngine) ? m_qmlEngine : m_cppEngine; + QTC_ASSERT(otherEngine, return); QTC_CHECK(otherEngine != slaveEngine); if (debug) { @@ -584,9 +580,11 @@ void QmlCppEngine::slaveEngineStateChanged if (state() == InferiorRunOk) { setState(InferiorStopRequested); } else if (state() == InferiorStopOk) { - notifyInferiorRunRequested(); - notifyInferiorRunOk(); - setState(InferiorStopRequested); + if (!isDying()) { + notifyInferiorRunRequested(); + notifyInferiorRunOk(); + setState(InferiorStopRequested); + } } else if (state() == InferiorRunRequested) { notifyInferiorRunOk(); setState(InferiorStopRequested); @@ -606,7 +604,7 @@ void QmlCppEngine::slaveEngineStateChanged || state() == InferiorStopOk, qDebug() << state()); // Just to make sure, we're shutting down anyway ... - setActiveEngine(m_cppEngine); + m_activeEngine = m_cppEngine; if (state() == InferiorStopRequested) setState(InferiorStopOk); |