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/projectexplorer/applicationlauncher.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/projectexplorer/applicationlauncher.cpp')
-rw-r--r-- | src/plugins/projectexplorer/applicationlauncher.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/plugins/projectexplorer/applicationlauncher.cpp b/src/plugins/projectexplorer/applicationlauncher.cpp index c0c920d068..0431ba0593 100644 --- a/src/plugins/projectexplorer/applicationlauncher.cpp +++ b/src/plugins/projectexplorer/applicationlauncher.cpp @@ -214,12 +214,14 @@ qint64 ApplicationLauncher::applicationPID() const void ApplicationLauncher::guiProcessError() { QString error; + QProcess::ExitStatus status = QProcess::NormalExit; switch (d->m_guiProcess.error()) { case QProcess::FailedToStart: error = tr("Failed to start program. Path or permissions wrong?"); break; case QProcess::Crashed: error = tr("The program has unexpectedly finished."); + status = QProcess::CrashExit; break; default: error = tr("Some error has occurred while running the program."); @@ -227,7 +229,7 @@ void ApplicationLauncher::guiProcessError() emit appendMessage(error + QLatin1Char('\n'), Utils::ErrorMessageFormat); if (d->m_processRunning && !isRunning()) { d->m_processRunning = false; - emit processExited(-1); + emit processExited(-1, status); } } @@ -236,7 +238,7 @@ void ApplicationLauncher::consoleProcessError(const QString &error) emit appendMessage(error + QLatin1Char('\n'), Utils::ErrorMessageFormat); if (d->m_processRunning && d->m_consoleProcess.applicationPID() == 0) { d->m_processRunning = false; - emit processExited(-1); + emit processExited(-1, QProcess::NormalExit); } } @@ -270,9 +272,9 @@ void ApplicationLauncher::checkDebugOutput(qint64 pid, const QString &message) } #endif -void ApplicationLauncher::processDone(int exitCode, QProcess::ExitStatus) +void ApplicationLauncher::processDone(int exitCode, QProcess::ExitStatus status) { - emit processExited(exitCode); + emit processExited(exitCode, status); } void ApplicationLauncher::bringToForeground() |