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

@@ -255,9 +255,10 @@ void ScriptEngine::startEngine()
if (!scriptFile.open(QIODevice::ReadOnly|QIODevice::Text)) {
showMessage(QString::fromLatin1("Cannot open %1: %2").
arg(m_scriptFileName, scriptFile.errorString()), LogError);
startFailed();
notifyEngineStartFailed();
return;
}
notifyEngineStarted();
QTextStream stream(&scriptFile);
m_scriptContents = stream.readAll();
scriptFile.close();
@@ -266,7 +267,6 @@ void ScriptEngine::startEngine()
showStatusMessage(tr("Running requested..."), 5000);
showMessage(QLatin1String("Running: ") + m_scriptFileName, LogMisc);
QTimer::singleShot(0, this, SLOT(runInferior()));
startSuccessful();
}
void ScriptEngine::continueInferior()