Commit 4f9b4b14 authored by Ulf Hermann's avatar Ulf Hermann

QmlProfiler: Set all timelinemodels at once

There is no need to waste time rebuilding all the labels etc for each
new model.

Change-Id: I1ca24da7d55100b3c8efd8eea650b68b8b7c7737
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@theqtcompany.com>
parent c75ddf6b
......@@ -129,16 +129,16 @@ QmlProfilerTraceView::QmlProfilerTraceView(QWidget *parent, QmlProfilerViewManag
d->m_modelProxy = new Timeline::TimelineModelAggregator(modelManager->notesModel(), this);
d->m_modelManager = modelManager;
d->m_modelProxy->addModel(new PixmapCacheModel(modelManager, d->m_modelProxy));
d->m_modelProxy->addModel(new SceneGraphTimelineModel(modelManager, d->m_modelProxy));
d->m_modelProxy->addModel(new MemoryUsageModel(modelManager, d->m_modelProxy));
d->m_modelProxy->addModel(new InputEventsModel(modelManager, d->m_modelProxy));
d->m_modelProxy->addModel(new DebugMessagesModel(modelManager, d->m_modelProxy));
d->m_modelProxy->addModel(new QmlProfilerAnimationsModel(modelManager, d->m_modelProxy));
QList<Timeline::TimelineModel *> models;
models.append(new PixmapCacheModel(modelManager, d->m_modelProxy));
models.append(new SceneGraphTimelineModel(modelManager, d->m_modelProxy));
models.append(new MemoryUsageModel(modelManager, d->m_modelProxy));
models.append(new InputEventsModel(modelManager, d->m_modelProxy));
models.append(new DebugMessagesModel(modelManager, d->m_modelProxy));
models.append(new QmlProfilerAnimationsModel(modelManager, d->m_modelProxy));
for (int i = 0; i < MaximumRangeType; ++i)
d->m_modelProxy->addModel(new QmlProfilerRangeModel(modelManager, (RangeType)i,
d->m_modelProxy));
models.append(new QmlProfilerRangeModel(modelManager, (RangeType)i, d->m_modelProxy));
d->m_modelProxy->setModels(models);
// Minimum height: 5 rows of 20 pixels + scrollbar of 50 pixels + 20 pixels margin
setMinimumHeight(170);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment