QmlProfiler: Fix "Callee" vs "Caller" labels in statistics view

Change-Id: I28a134b0ae72bb87ad6849f0f70a5332ec019a50
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2016-05-24 15:50:31 +02:00
parent a5b7ba58f0
commit d33dcac6ca
3 changed files with 8 additions and 1 deletions

View File

@@ -394,6 +394,11 @@ void QmlProfilerStatisticsRelativesModel::finalize(const QSet<int> &eventsInBind
}
}
QmlProfilerStatisticsRelation QmlProfilerStatisticsRelativesModel::relation() const
{
return m_relation;
}
int QmlProfilerStatisticsRelativesModel::count() const
{
return m_data.count();

View File

@@ -124,6 +124,8 @@ public:
void loadEvent(const QmlEvent &event);
void finalize(const QSet<int> &eventsInBindingLoop);
QmlProfilerStatisticsRelation relation() const;
signals:
void dataAvailable();

View File

@@ -914,7 +914,7 @@ void QmlProfilerStatisticsRelativesView::clear()
void QmlProfilerStatisticsRelativesView::updateHeader()
{
bool calleesView = qobject_cast<QmlProfilerStatisticsRelativesModel *>(d->model) != 0;
bool calleesView = d->model->relation() == QmlProfilerStatisticsChilden;
if (treeModel()) {
treeModel()->setColumnCount(5);