QML debugging: Make sure the engine detects a remote process quitting.

Change-Id: Ie41d327432b539264035f104081d4d4b02b56217
Reviewed-on: http://codereview.qt.nokia.com/1171
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
This commit is contained in:
Christian Kandeler
2011-07-05 16:15:05 +02:00
parent 1f9be179f0
commit 7ecf1e75d4

View File

@@ -181,12 +181,16 @@ void AbstractRemoteLinuxDebugSupport::startExecution()
void AbstractRemoteLinuxDebugSupport::handleRemoteProcessFinished(qint64 exitCode)
{
if (!m_engine || m_state == Inactive || exitCode == 0)
if (!m_engine || m_state == Inactive)
return;
if (m_state == Debugging) {
if (m_debuggingType != RemoteLinuxRunConfiguration::DebugQmlOnly)
// The QML engine does not realize on its own that the application has finished.
if (m_debuggingType == RemoteLinuxRunConfiguration::DebugQmlOnly)
m_engine->quitDebugger();
else if (exitCode != 0)
m_engine->notifyInferiorIll();
} else {
const QString errorMsg = m_debuggingType == RemoteLinuxRunConfiguration::DebugQmlOnly
? tr("Remote application failed with exit code %1.").arg(exitCode)