forked from qt-creator/qt-creator
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:
@@ -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();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user