aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmlprofiler
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@theqtcompany.com>2015-05-20 13:12:33 +0200
committerUlf Hermann <ulf.hermann@theqtcompany.com>2015-05-21 15:19:38 +0000
commit583543ebdab4538497e63cf62d26ab96704ba7b9 (patch)
tree044fc5c1aebd187e5ad8c2de7b2cf308b6660f10 /tools/qmlprofiler
parent6b7060e9ac6b7f171b7357aabc2d192ace21001f (diff)
qmlprofiler: In interactive mode, don't quit if application quits
We might want to inspect or save the pending data in some special way. Change-Id: I235b1f948ad4a9ddd100332991243231119bcf08 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'tools/qmlprofiler')
-rw-r--r--tools/qmlprofiler/qmlprofilerapplication.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/qmlprofiler/qmlprofilerapplication.cpp b/tools/qmlprofiler/qmlprofilerapplication.cpp
index eb67b5f40e..c2d3375d10 100644
--- a/tools/qmlprofiler/qmlprofilerapplication.cpp
+++ b/tools/qmlprofiler/qmlprofilerapplication.cpp
@@ -354,19 +354,19 @@ void QmlProfilerApplication::processHasOutput()
void QmlProfilerApplication::processFinished()
{
Q_ASSERT(m_process);
+ int exitCode = 0;
if (m_process->exitStatus() == QProcess::NormalExit) {
logStatus(QString("Process exited (%1).").arg(m_process->exitCode()));
-
if (m_recording) {
- logError("Process exited while recording, last trace is lost!");
- exit(2);
- } else {
- exit(0);
+ logError("Process exited while recording, last trace is damaged!");
+ exitCode = 2;
}
} else {
- logError("Process crashed! Exiting ...");
- exit(3);
+ logError("Process crashed!");
+ exitCode = 3;
}
+ if (!m_interactive)
+ exit(exitCode);
}
void QmlProfilerApplication::traceClientEnabled()