forked from qt-creator/qt-creator
ApplicationLauncher: Also emit the exit status
And adjust the message in the appliation output to take the exit status into account. Change-Id: I1b7507fdc8ff6fa7ec3db48dba72ad723f124fc3 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
@@ -111,19 +111,25 @@ void LocalQmlProfilerRunner::start()
|
||||
|
||||
m_launcher.setWorkingDirectory(m_configuration.workingDirectory);
|
||||
m_launcher.setEnvironment(m_configuration.environment);
|
||||
connect(&m_launcher, SIGNAL(processExited(int)), this, SLOT(spontaneousStop(int)));
|
||||
connect(&m_launcher, SIGNAL(processExited(int,QProcess::ExitStatus)),
|
||||
this, SLOT(spontaneousStop(int,QProcess::ExitStatus)));
|
||||
m_launcher.start(ProjectExplorer::ApplicationLauncher::Gui, m_configuration.executable,
|
||||
arguments);
|
||||
|
||||
emit started();
|
||||
}
|
||||
|
||||
void LocalQmlProfilerRunner::spontaneousStop(int exitCode)
|
||||
void LocalQmlProfilerRunner::spontaneousStop(int exitCode, QProcess::ExitStatus status)
|
||||
{
|
||||
if (QmlProfilerPlugin::debugOutput)
|
||||
qWarning("QmlProfiler: Application exited (exit code %d).", exitCode);
|
||||
if (QmlProfilerPlugin::debugOutput) {
|
||||
if (status == QProcess::CrashExit)
|
||||
qWarning("QmlProfiler: Application crashed.");
|
||||
else
|
||||
qWarning("QmlProfiler: Application exited (exit code %d).", exitCode);
|
||||
}
|
||||
|
||||
disconnect(&m_launcher, SIGNAL(processExited(int)), this, SLOT(spontaneousStop(int)));
|
||||
disconnect(&m_launcher, SIGNAL(processExited(int,QProcess::ExitStatus)),
|
||||
this, SLOT(spontaneousStop(int,QProcess::ExitStatus)));
|
||||
|
||||
emit stopped();
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
virtual quint16 debugPort() const;
|
||||
|
||||
private slots:
|
||||
void spontaneousStop(int exitCode);
|
||||
void spontaneousStop(int exitCode, QProcess::ExitStatus status);
|
||||
|
||||
private:
|
||||
LocalQmlProfilerRunner(const Configuration &configuration, QmlProfilerRunControl *engine);
|
||||
|
||||
Reference in New Issue
Block a user