QmlProfiler: Don't re-estimate profiling time when not profiling

Change-Id: I2485aff4f1317a0bf194455969757da497c7e404
Task-number: QTCREATORBUG-14024
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2015-02-25 17:37:11 +01:00
parent ad484b1c2f
commit d2a3f3f2c7

View File

@@ -264,13 +264,14 @@ void QmlProfilerStateWidget::profilerStateChanged()
if (d->m_profilerState->currentState() == QmlProfilerStateManager::AppStarting) if (d->m_profilerState->currentState() == QmlProfilerStateManager::AppStarting)
d->appKilled = false; d->appKilled = false;
d->isRecording = d->m_profilerState->serverRecording(); if (d->m_profilerState->serverRecording()) {
if (d->isRecording)
d->profilingTimer.start(); d->profilingTimer.start();
else { d->isRecording = true;
} else if (d->isRecording) {
// estimated time in ns // estimated time in ns
d->estimatedProfilingTime = d->profilingTimer.elapsed() * 1e6; d->estimatedProfilingTime = d->profilingTimer.elapsed() * 1e6;
emit newTimeEstimation(d->estimatedProfilingTime); emit newTimeEstimation(d->estimatedProfilingTime);
d->isRecording = false;
} }
updateDisplay(); updateDisplay();
} }