diff options
author | Daniel Teske <daniel.teske@digia.com> | 2013-08-01 17:38:49 +0200 |
---|---|---|
committer | Daniel Teske <daniel.teske@digia.com> | 2013-08-02 15:04:59 +0200 |
commit | c1919f0ac30a224785d05c377f2193baee38cc1b (patch) | |
tree | a9094a9509ad546ec58886ab62ffbeaee117d40b /src/plugins/qmlprofiler/localqmlprofilerrunner.cpp | |
parent | 2654141511273c43548032a8901f71128184ec1b (diff) | |
download | qt-creator-c1919f0ac30a224785d05c377f2193baee38cc1b.tar.gz |
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>
Diffstat (limited to 'src/plugins/qmlprofiler/localqmlprofilerrunner.cpp')
-rw-r--r-- | src/plugins/qmlprofiler/localqmlprofilerrunner.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
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(); } |