debugger: switch to an existing engine if a new one fails to start

Task-number: QTCREATORBUG-2912
This commit is contained in:
hjk
2010-12-01 15:20:46 +01:00
parent 7c35a577cc
commit 1d5fadb12e

View File

@@ -3240,9 +3240,15 @@ void DebuggerPluginPrivate::runControlStarted(DebuggerRunControl *runControl)
void DebuggerPluginPrivate::runControlFinished(DebuggerRunControl *runControl)
{
m_snapshotHandler->removeSnapshot(runControl);
disconnectEngine();
if (boolSetting(SwitchModeOnExit) && m_snapshotHandler->size() == 0)
activatePreviousMode();
if (m_snapshotHandler->size() == 0) {
// Last engine quits.
disconnectEngine();
if (boolSetting(SwitchModeOnExit))
activatePreviousMode();
} else {
// Connect to some existing engine.
m_snapshotHandler->activateSnapshot(0);
}
}
void DebuggerPluginPrivate::remoteCommand(const QStringList &options,