From 53cbf5dfae54bd1b9b1259678ab0515fc3d3b3f1 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 14 Mar 2011 11:43:33 +0100 Subject: [PATCH] Debugger[CDB]: Use standard shutdown path within QML/CPP debugging. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit As the InferiorShutdown-State is required to synchronize the engines. Task-number: QTCREATORBUG-4026 Initial-patch-by: Kai Köhne --- src/plugins/debugger/cdb/cdbengine.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp index d0ea4ba83a..fd71b5d385 100644 --- a/src/plugins/debugger/cdb/cdbengine.cpp +++ b/src/plugins/debugger/cdb/cdbengine.cpp @@ -940,8 +940,15 @@ void CdbEngine::processFinished() notifyEngineShutdownOk(); } } else { - STATE_DEBUG(state(), Q_FUNC_INFO, __LINE__, "notifyEngineSpontaneousShutdown") - notifyEngineSpontaneousShutdown(); + // The QML/CPP engine relies on the standard sequence of InferiorShutDown,etc. + // Otherwise, we take a shortcut. + if (isSlaveEngine()) { + STATE_DEBUG(state(), Q_FUNC_INFO, __LINE__, "notifyInferiorExited") + notifyInferiorExited(); + } else { + STATE_DEBUG(state(), Q_FUNC_INFO, __LINE__, "notifyEngineSpontaneousShutdown") + notifyEngineSpontaneousShutdown(); + } } } -- 2.11.0