QmlProfiler: allow for multiple sequential traces to be aggregated

Task-number: QTCREATORBUG-13317
Change-Id: Ic7d1d5c94d8d522741b6c4207a21a43f521da5fb
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2015-11-18 12:34:52 +01:00
parent 030acfdf73
commit ffc11d5e9e
9 changed files with 93 additions and 12 deletions

View File

@@ -30,6 +30,8 @@
#include "qmlprofilerstatewidget.h"
#include <utils/qtcassert.h>
#include <QPainter>
#include <QVBoxLayout>
#include <QLabel>
@@ -202,11 +204,23 @@ void QmlProfilerStateWidget::updateDisplay()
return;
}
} else if (d->m_modelManager->progress() != 0 && !d->m_modelManager->isEmpty()) {
// When datamodel is acquiring data
if (d->m_profilerState->currentState() != QmlProfilerStateManager::Idle)
showText(tr("Loading data"), true);
else // Application died before all data could be read
showText(tr("Application stopped before loading all data"), true);
// When datamodel is acquiring or processing data
if (state == QmlProfilerModelManager::ProcessingData) {
showText(tr("Processing data"), true);
} else if (d->m_profilerState->currentState() != QmlProfilerStateManager::Idle) {
if (state == QmlProfilerModelManager::AcquiringData) {
// we don't know how much more, so progress numbers are strange here
showText(tr("Waiting for more data"));
} else if (state == QmlProfilerModelManager::ClearingData) {
// when starting a second recording from the same process without aggregation
showText(tr("Clearing old trace"));
}
} else if (state == QmlProfilerModelManager::AcquiringData) {
// Application died before all data could be read
showText(tr("Application stopped before loading all data"));
} else if (state == QmlProfilerModelManager::ClearingData) {
showText(tr("Clearing old trace"));
}
return;
} else if (state == QmlProfilerModelManager::AcquiringData) {
showText(tr("Waiting for data"));