Debugger: Change semantics of DebuggerEngine::masterEngine()

Make it return 'this' if 'this' is the master engine itself.
Adapt users.

Also do not let the QmlEngine try to beginConnection() when
the combined engine was isDying() already.

Change-Id: I308deae14a3c4966be381f321c0d9dfaf82c40d6
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
hjk
2017-12-14 10:12:17 +01:00
parent ff04632b92
commit d47fdb934d
4 changed files with 8 additions and 17 deletions

View File

@@ -931,10 +931,7 @@ void DebuggerEngine::notifyDebuggerProcessFinished(int exitCode,
break;
default: {
// Initiate shutdown sequence
if (isMasterEngine())
notifyEngineIll();
else
masterEngine()->notifyInferiorIll();
masterEngine()->notifyInferiorIll();
const QString msg = exitStatus == QProcess::CrashExit ?
tr("The %1 process terminated.") :
tr("The %2 process terminated unexpectedly (exit code %1).").arg(exitCode);
@@ -1019,9 +1016,9 @@ void DebuggerEngine::setMasterEngine(DebuggerEngine *masterEngine)
d->m_masterEngine = masterEngine;
}
DebuggerEngine *DebuggerEngine::masterEngine() const
DebuggerEngine *DebuggerEngine::masterEngine()
{
return d->m_masterEngine;
return d->m_masterEngine ? d->m_masterEngine : this;
}
bool DebuggerEngine::canDisplayTooltip() const