summaryrefslogtreecommitdiff
path: root/src/plugins/qmlprofiler/qmlprofilerengine.cpp
diff options
context:
space:
mode:
authorChristiaan Janssen <christiaan.janssen@nokia.com>2011-04-14 16:05:41 +0200
committerChristiaan Janssen <christiaan.janssen@nokia.com>2011-04-14 16:15:08 +0200
commitb7bb522d5ed8a2fe63b765d58c41131a69a80306 (patch)
tree5307720328848d5ca7a417967820ed4632cd038e /src/plugins/qmlprofiler/qmlprofilerengine.cpp
parent19190384b68baebcbc2873444937f5f4fc2064e3 (diff)
downloadqt-creator-b7bb522d5ed8a2fe63b765d58c41131a69a80306.tar.gz
QmlProfiler: Fixing regression for non-recording runs
Reviewed-by: Kai Koehne
Diffstat (limited to 'src/plugins/qmlprofiler/qmlprofilerengine.cpp')
-rw-r--r--src/plugins/qmlprofiler/qmlprofilerengine.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilerengine.cpp b/src/plugins/qmlprofiler/qmlprofilerengine.cpp
index 3489ed1d1c..2862dd184f 100644
--- a/src/plugins/qmlprofiler/qmlprofilerengine.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilerengine.cpp
@@ -73,6 +73,7 @@ public:
QProcess *m_process;
bool m_running;
bool m_fetchingData;
+ bool m_delayedDelete;
};
QmlProfilerEngine::QmlProfilerEngine(const Analyzer::AnalyzerStartParameters &sp, ProjectExplorer::RunConfiguration *runConfiguration)
@@ -83,6 +84,7 @@ QmlProfilerEngine::QmlProfilerEngine(const Analyzer::AnalyzerStartParameters &sp
d->m_process = 0;
d->m_running = false;
d->m_fetchingData = false;
+ d->m_delayedDelete = false;
}
QmlProfilerEngine::~QmlProfilerEngine()
@@ -96,14 +98,18 @@ void QmlProfilerEngine::start()
{
d->launchperfmonitor();
d->m_running = true;
+ d->m_delayedDelete = false;
emit processRunning();
}
void QmlProfilerEngine::stop()
{
- if (d->m_fetchingData)
+ if (d->m_fetchingData) {
+ if (d->m_running)
+ d->m_delayedDelete = true;
emit stopRecording();
+ }
else
finishProcess();
}
@@ -120,6 +126,12 @@ void QmlProfilerEngine::setFetchingData(bool b)
d->m_fetchingData = b;
}
+void QmlProfilerEngine::dataReceived() {
+ if (d->m_delayedDelete)
+ finishProcess();
+ d->m_delayedDelete = false;
+}
+
void QmlProfilerEngine::finishProcess()
{
if (d->m_running) {