From d2a3f3f2c7374fca918bf9fe42a64ff432b0d785 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Wed, 25 Feb 2015 17:37:11 +0100 Subject: [PATCH] QmlProfiler: Don't re-estimate profiling time when not profiling Change-Id: I2485aff4f1317a0bf194455969757da497c7e404 Task-number: QTCREATORBUG-14024 Reviewed-by: Joerg Bornemann --- src/plugins/qmlprofiler/qmlprofilerstatewidget.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/qmlprofiler/qmlprofilerstatewidget.cpp b/src/plugins/qmlprofiler/qmlprofilerstatewidget.cpp index 7789a778149..4fe735257ae 100644 --- a/src/plugins/qmlprofiler/qmlprofilerstatewidget.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerstatewidget.cpp @@ -264,13 +264,14 @@ void QmlProfilerStateWidget::profilerStateChanged() if (d->m_profilerState->currentState() == QmlProfilerStateManager::AppStarting) d->appKilled = false; - d->isRecording = d->m_profilerState->serverRecording(); - if (d->isRecording) + if (d->m_profilerState->serverRecording()) { d->profilingTimer.start(); - else { + d->isRecording = true; + } else if (d->isRecording) { // estimated time in ns d->estimatedProfilingTime = d->profilingTimer.elapsed() * 1e6; emit newTimeEstimation(d->estimatedProfilingTime); + d->isRecording = false; } updateDisplay(); }