From c1919f0ac30a224785d05c377f2193baee38cc1b Mon Sep 17 00:00:00 2001 From: Daniel Teske Date: Thu, 1 Aug 2013 17:38:49 +0200 Subject: 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 Reviewed-by: Daniel Teske --- src/plugins/qmlprofiler/localqmlprofilerrunner.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src/plugins/qmlprofiler/localqmlprofilerrunner.cpp') diff --git a/src/plugins/qmlprofiler/localqmlprofilerrunner.cpp b/src/plugins/qmlprofiler/localqmlprofilerrunner.cpp index 9f246030e8..852ddd62a7 100644 --- a/src/plugins/qmlprofiler/localqmlprofilerrunner.cpp +++ b/src/plugins/qmlprofiler/localqmlprofilerrunner.cpp @@ -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(); } -- cgit v1.2.1