QmlProfiler: Load data event by event in aggregated models

This paves the way for driving the event loading from the model
manager. Also, unify the loading and eliminate the two different
classes for the children models.

Change-Id: Ic89e757963292d75b3b6fd7d6012f09194dff5a9
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
Ulf Hermann
2016-04-26 16:38:56 +02:00
parent bc18fafffd
commit dd87df7e5d
6 changed files with 265 additions and 303 deletions

View File

@@ -191,10 +191,12 @@ QmlProfilerStatisticsView::QmlProfilerStatisticsView(QWidget *parent,
this, &QmlProfilerStatisticsView::typeSelected);
d->m_eventChildren = new QmlProfilerStatisticsRelativesView(
new QmlProfilerStatisticsChildrenModel(profilerModelManager, d->model, this),
new QmlProfilerStatisticsRelativesModel(profilerModelManager, d->model,
QmlProfilerStatisticsChilden, this),
this);
d->m_eventParents = new QmlProfilerStatisticsRelativesView(
new QmlProfilerStatisticsParentsModel(profilerModelManager, d->model, this),
new QmlProfilerStatisticsRelativesModel(profilerModelManager, d->model,
QmlProfilerStatisticsParents, this),
this);
connect(d->m_eventTree, &QmlProfilerStatisticsMainView::typeSelected,
d->m_eventChildren, &QmlProfilerStatisticsRelativesView::displayType);
@@ -935,7 +937,7 @@ void QmlProfilerStatisticsRelativesView::clear()
void QmlProfilerStatisticsRelativesView::updateHeader()
{
bool calleesView = qobject_cast<QmlProfilerStatisticsChildrenModel *>(d->model) != 0;
bool calleesView = qobject_cast<QmlProfilerStatisticsRelativesModel *>(d->model) != 0;
if (treeModel()) {
treeModel()->setColumnCount(5);