Debugger: Drop base DebuggerEngine::runEngine()

The lines between engine setup and running have always been
blurry, so it looks more and more unnatural to enforce this
in the architecture. Remove the runEngine() call from the
end of notifySetupEngineOk, and do it on the user side.

Change-Id: I3a5e158e8b3fe9b0a288d064f798e24b2ac47f86
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
hjk
2020-12-18 17:58:05 +01:00
parent 16421d08d3
commit b0d2c0d45d
14 changed files with 34 additions and 36 deletions

View File

@@ -501,29 +501,6 @@ void QmlEngine::closeConnection()
}
}
void QmlEngine::runEngine()
{
// we won't get any debug output
if (!terminal()) {
d->retryOnConnectFail = true;
d->automaticConnect = true;
}
QTC_ASSERT(state() == EngineRunRequested, qDebug() << state());
if (isPrimaryEngine()) {
// QML only.
if (runParameters().startMode == AttachToRemoteServer)
tryToConnect();
else if (runParameters().startMode == AttachToRemoteProcess)
beginConnection();
else
startApplicationLauncher();
} else {
tryToConnect();
}
}
void QmlEngine::startApplicationLauncher()
{
if (!d->applicationLauncher.isRunning()) {
@@ -576,6 +553,26 @@ void QmlEngine::setupEngine()
{
notifyEngineSetupOk();
// we won't get any debug output
if (!terminal()) {
d->retryOnConnectFail = true;
d->automaticConnect = true;
}
QTC_ASSERT(state() == EngineRunRequested, qDebug() << state());
if (isPrimaryEngine()) {
// QML only.
if (runParameters().startMode == AttachToRemoteServer)
tryToConnect();
else if (runParameters().startMode == AttachToRemoteProcess)
beginConnection();
else
startApplicationLauncher();
} else {
tryToConnect();
}
if (d->automaticConnect)
beginConnection();
}