debugger: encapsulate part of the startup logic in the base class

This commit is contained in:
hjk
2010-07-08 14:26:35 +02:00
parent e721b9f70f
commit 85243e19a9
8 changed files with 46 additions and 44 deletions

View File

@@ -387,7 +387,7 @@ void CdbEngine::startEngine()
warning(QLatin1String("Internal error: Attempt to start debugger while another process is being debugged."));
setState(EngineStartFailed, Q_FUNC_INFO, __LINE__);
setState(DebuggerNotReady, Q_FUNC_INFO, __LINE__);
emit startFailed();
notifyEngineStartFailed();
return;
}
switch (sp.startMode) {
@@ -396,7 +396,7 @@ void CdbEngine::startEngine()
warning(QLatin1String("Internal error: Mode not supported."));
setState(EngineStartFailed, Q_FUNC_INFO, __LINE__);
setState(DebuggerNotReady, Q_FUNC_INFO, __LINE__);
emit startFailed();
notifyEngineStartFailed();
break;
default:
break;
@@ -470,11 +470,11 @@ void CdbEngine::startEngine()
if (rc) {
if (needWatchTimer)
m_d->startWatchTimer();
startSuccessful();
notifyEngineStarted();
} else {
warning(errorMessage);
setState(InferiorStartFailed, Q_FUNC_INFO, __LINE__);
startFailed();
notifyEngineStartFailed();
}
}