Commit 3cd2d375 authored by Ulf Hermann's avatar Ulf Hermann
Browse files

QmlProfiler: Rename QmlProfilerEventsModelProxy



It is only used for the statistics view.

Change-Id: I71027dd864715b4a2f95c2b11af0c0d83c514229
Reviewed-by: default avatarJoerg Bornemann <joerg.bornemann@theqtcompany.com>
parent 4223d76c
......@@ -13,7 +13,6 @@ SOURCES += \
qmlprofilerconfigwidget.cpp \
qmlprofilerdatamodel.cpp \
qmlprofilerdetailsrewriter.cpp \
qmlprofilereventsmodelproxy.cpp \
qmlprofilermodelmanager.cpp \
qmlprofilernotesmodel.cpp \
qmlprofileroptionspage.cpp \
......@@ -25,6 +24,7 @@ SOURCES += \
qmlprofilersettings.cpp \
qmlprofilerstatemanager.cpp \
qmlprofilerstatewidget.cpp \
qmlprofilerstatisticsmodel.cpp \
qmlprofilerstatisticsview.cpp \
qmlprofilertimelinemodel.cpp \
qmlprofilertimelinemodelfactory.cpp \
......@@ -44,7 +44,6 @@ HEADERS += \
qmlprofilerconstants.h \
qmlprofilerdatamodel.h \
qmlprofilerdetailsrewriter.h \
qmlprofilereventsmodelproxy.h \
qmlprofilereventsview.h \
qmlprofilermodelmanager.h \
qmlprofilernotesmodel.h \
......@@ -57,6 +56,7 @@ HEADERS += \
qmlprofilersettings.h \
qmlprofilerstatemanager.h \
qmlprofilerstatewidget.h \
qmlprofilerstatisticsmodel.h \
qmlprofilerstatisticsview.h \
qmlprofilertimelinemodel.h \
qmlprofilertimelinemodelfactory.h \
......
......@@ -29,7 +29,6 @@ QtcPlugin {
"qmlprofilerconfigwidget.ui", "qmlprofilerconstants.h",
"qmlprofilerdatamodel.cpp", "qmlprofilerdatamodel.h",
"qmlprofilerdetailsrewriter.cpp", "qmlprofilerdetailsrewriter.h",
"qmlprofilereventsmodelproxy.cpp", "qmlprofilereventsmodelproxy.h",
"qmlprofilereventsview.h",
"qmlprofilermodelmanager.cpp", "qmlprofilermodelmanager.h",
"qmlprofilernotesmodel.cpp", "qmlprofilernotesmodel.h",
......@@ -42,6 +41,7 @@ QtcPlugin {
"qmlprofilersettings.cpp", "qmlprofilersettings.h",
"qmlprofilerstatemanager.cpp", "qmlprofilerstatemanager.h",
"qmlprofilerstatewidget.cpp", "qmlprofilerstatewidget.h",
"qmlprofilerstatisticsmodel.cpp", "qmlprofilerstatisticsmodel.h",
"qmlprofilerstatisticsview.cpp", "qmlprofilerstatisticsview.h",
"qmlprofilertimelinemodel.cpp", "qmlprofilertimelinemodel.h",
"qmlprofilertimelinemodelfactory.cpp", "qmlprofilertimelinemodelfactory.h",
......
......@@ -28,7 +28,7 @@
**
****************************************************************************/
#include "qmlprofilereventsmodelproxy.h"
#include "qmlprofilerstatisticsmodel.h"
#include "qmlprofilermodelmanager.h"
#include "qmlprofilerdatamodel.h"
......@@ -45,18 +45,17 @@
#include <QDebug>
namespace QmlProfiler {
namespace Internal {
class QmlProfilerEventsModelProxy::QmlProfilerEventsModelProxyPrivate
class QmlProfilerStatisticsModel::QmlProfilerStatisticsModelPrivate
{
public:
QmlProfilerEventsModelProxyPrivate(QmlProfilerEventsModelProxy *qq) : q(qq) {}
~QmlProfilerEventsModelProxyPrivate() {}
QmlProfilerStatisticsModelPrivate(QmlProfilerStatisticsModel *qq) : q(qq) {}
~QmlProfilerStatisticsModelPrivate() {}
QHash<int, QmlProfilerEventsModelProxy::QmlEventStats> data;
QHash<int, QmlProfilerStatisticsModel::QmlEventStats> data;
QmlProfilerModelManager *modelManager;
QmlProfilerEventsModelProxy *q;
QmlProfilerStatisticsModel *q;
int modelId;
......@@ -65,14 +64,15 @@ public:
QHash<int, QString> notes;
};
QmlProfilerEventsModelProxy::QmlProfilerEventsModelProxy(QmlProfilerModelManager *modelManager, QObject *parent)
: QObject(parent), d(new QmlProfilerEventsModelProxyPrivate(this))
QmlProfilerStatisticsModel::QmlProfilerStatisticsModel(QmlProfilerModelManager *modelManager,
QObject *parent) :
QObject(parent), d(new QmlProfilerStatisticsModelPrivate(this))
{
d->modelManager = modelManager;
connect(modelManager->qmlModel(), &QmlProfilerDataModel::changed,
this, &QmlProfilerEventsModelProxy::dataChanged);
this, &QmlProfilerStatisticsModel::dataChanged);
connect(modelManager->notesModel(), &Timeline::TimelineNotesModel::changed,
this, &QmlProfilerEventsModelProxy::notesChanged);
this, &QmlProfilerStatisticsModel::notesChanged);
d->modelId = modelManager->registerModelProxy();
// We're iterating twice in loadData.
......@@ -83,12 +83,12 @@ QmlProfilerEventsModelProxy::QmlProfilerEventsModelProxy(QmlProfilerModelManager
modelManager->announceFeatures(d->modelId, QmlDebug::Constants::QML_JS_RANGE_FEATURES);
}
QmlProfilerEventsModelProxy::~QmlProfilerEventsModelProxy()
QmlProfilerStatisticsModel::~QmlProfilerStatisticsModel()
{
delete d;
}
void QmlProfilerEventsModelProxy::setEventTypeAccepted(QmlDebug::RangeType type, bool accepted)
void QmlProfilerStatisticsModel::setEventTypeAccepted(QmlDebug::RangeType type, bool accepted)
{
if (accepted && !d->acceptedTypes.contains(type))
d->acceptedTypes << type;
......@@ -96,27 +96,27 @@ void QmlProfilerEventsModelProxy::setEventTypeAccepted(QmlDebug::RangeType type,
d->acceptedTypes.removeOne(type);
}
bool QmlProfilerEventsModelProxy::eventTypeAccepted(QmlDebug::RangeType type) const
bool QmlProfilerStatisticsModel::eventTypeAccepted(QmlDebug::RangeType type) const
{
return d->acceptedTypes.contains(type);
}
const QHash<int, QmlProfilerEventsModelProxy::QmlEventStats> &QmlProfilerEventsModelProxy::getData() const
const QHash<int, QmlProfilerStatisticsModel::QmlEventStats> &QmlProfilerStatisticsModel::getData() const
{
return d->data;
}
const QVector<QmlProfilerDataModel::QmlEventTypeData> &QmlProfilerEventsModelProxy::getTypes() const
const QVector<QmlProfilerDataModel::QmlEventTypeData> &QmlProfilerStatisticsModel::getTypes() const
{
return d->modelManager->qmlModel()->getEventTypes();
}
const QHash<int, QString> &QmlProfilerEventsModelProxy::getNotes() const
const QHash<int, QString> &QmlProfilerStatisticsModel::getNotes() const
{
return d->notes;
}
void QmlProfilerEventsModelProxy::clear()
void QmlProfilerStatisticsModel::clear()
{
d->modelManager->modelProxyCountUpdated(d->modelId, 0, 1);
d->data.clear();
......@@ -124,13 +124,13 @@ void QmlProfilerEventsModelProxy::clear()
d->notes.clear();
}
void QmlProfilerEventsModelProxy::limitToRange(qint64 rangeStart, qint64 rangeEnd)
void QmlProfilerStatisticsModel::limitToRange(qint64 rangeStart, qint64 rangeEnd)
{
if (!d->modelManager->isEmpty())
loadData(rangeStart, rangeEnd);
}
void QmlProfilerEventsModelProxy::dataChanged()
void QmlProfilerStatisticsModel::dataChanged()
{
if (d->modelManager->state() == QmlProfilerModelManager::ProcessingData)
loadData();
......@@ -138,7 +138,7 @@ void QmlProfilerEventsModelProxy::dataChanged()
clear();
}
void QmlProfilerEventsModelProxy::notesChanged(int typeIndex)
void QmlProfilerStatisticsModel::notesChanged(int typeIndex)
{
const QmlProfilerNotesModel *notesModel = d->modelManager->notesModel();
if (typeIndex == -1) {
......@@ -170,12 +170,12 @@ void QmlProfilerEventsModelProxy::notesChanged(int typeIndex)
emit notesAvailable(typeIndex);
}
const QSet<int> &QmlProfilerEventsModelProxy::eventsInBindingLoop() const
const QSet<int> &QmlProfilerStatisticsModel::eventsInBindingLoop() const
{
return d->eventsInBindingLoop;
}
void QmlProfilerEventsModelProxy::loadData(qint64 rangeStart, qint64 rangeEnd)
void QmlProfilerStatisticsModel::loadData(qint64 rangeStart, qint64 rangeEnd)
{
clear();
......@@ -291,75 +291,69 @@ void QmlProfilerEventsModelProxy::loadData(qint64 rangeStart, qint64 rangeEnd)
emit dataAvailable();
}
int QmlProfilerEventsModelProxy::count() const
int QmlProfilerStatisticsModel::count() const
{
return d->data.count();
}
QmlProfilerEventRelativesModelProxy::QmlProfilerEventRelativesModelProxy(QmlProfilerModelManager *modelManager,
QmlProfilerEventsModelProxy *eventsModel,
QObject *parent)
: QObject(parent)
QmlProfilerStatisticsRelativesModel::QmlProfilerStatisticsRelativesModel(
QmlProfilerModelManager *modelManager, QmlProfilerStatisticsModel *statisticsModel,
QObject *parent) : QObject(parent)
{
QTC_CHECK(modelManager);
m_modelManager = modelManager;
QTC_CHECK(eventsModel);
m_eventsModel = eventsModel;
QTC_CHECK(statisticsModel);
m_statisticsModel = statisticsModel;
// Load the child models whenever the parent model is done to get the filtering for JS/QML
// right.
connect(m_eventsModel, &QmlProfilerEventsModelProxy::dataAvailable,
this, &QmlProfilerEventRelativesModelProxy::dataChanged);
connect(m_statisticsModel, &QmlProfilerStatisticsModel::dataAvailable,
this, &QmlProfilerStatisticsRelativesModel::dataChanged);
}
QmlProfilerEventRelativesModelProxy::~QmlProfilerEventRelativesModelProxy()
const QmlProfilerStatisticsRelativesModel::QmlStatisticsRelativesMap &
QmlProfilerStatisticsRelativesModel::getData(int typeId) const
{
}
const QmlProfilerEventRelativesModelProxy::QmlEventRelativesMap &QmlProfilerEventRelativesModelProxy::getData(int typeId) const
{
QHash <int, QmlEventRelativesMap>::ConstIterator it = m_data.find(typeId);
QHash <int, QmlStatisticsRelativesMap>::ConstIterator it = m_data.find(typeId);
if (it != m_data.end()) {
return it.value();
} else {
static const QmlEventRelativesMap emptyMap;
static const QmlStatisticsRelativesMap emptyMap;
return emptyMap;
}
}
const QVector<QmlProfilerDataModel::QmlEventTypeData> &QmlProfilerEventRelativesModelProxy::getTypes() const
const QVector<QmlProfilerDataModel::QmlEventTypeData> &
QmlProfilerStatisticsRelativesModel::getTypes() const
{
return m_modelManager->qmlModel()->getEventTypes();
}
int QmlProfilerEventRelativesModelProxy::count() const
int QmlProfilerStatisticsRelativesModel::count() const
{
return m_data.count();
}
void QmlProfilerEventRelativesModelProxy::clear()
void QmlProfilerStatisticsRelativesModel::clear()
{
m_data.clear();
}
void QmlProfilerEventRelativesModelProxy::dataChanged()
void QmlProfilerStatisticsRelativesModel::dataChanged()
{
loadData();
emit dataAvailable();
}
QmlProfilerEventParentsModelProxy::QmlProfilerEventParentsModelProxy(QmlProfilerModelManager *modelManager,
QmlProfilerEventsModelProxy *eventsModel,
QObject *parent)
: QmlProfilerEventRelativesModelProxy(modelManager, eventsModel, parent)
{}
QmlProfilerEventParentsModelProxy::~QmlProfilerEventParentsModelProxy()
QmlProfilerStatisticsParentsModel::QmlProfilerStatisticsParentsModel(
QmlProfilerModelManager *modelManager, QmlProfilerStatisticsModel *statisticsModel,
QObject *parent) :
QmlProfilerStatisticsRelativesModel(modelManager, statisticsModel, parent)
{}
void QmlProfilerEventParentsModelProxy::loadData()
void QmlProfilerStatisticsParentsModel::loadData()
{
clear();
QmlProfilerDataModel *simpleModel = m_modelManager->qmlModel();
......@@ -371,7 +365,7 @@ void QmlProfilerEventParentsModelProxy::loadData()
int level = QmlDebug::Constants::QML_MIN_LEVEL;
endtimesPerLevel[0] = 0;
const QSet<int> &eventsInBindingLoop = m_eventsModel->eventsInBindingLoop();
const QSet<int> &eventsInBindingLoop = m_statisticsModel->eventsInBindingLoop();
// compute parent-child relationship and call count
QHash<int, int> lastParent;
......@@ -379,7 +373,7 @@ void QmlProfilerEventParentsModelProxy::loadData()
const QVector<QmlProfilerDataModel::QmlEventTypeData> typesList = simpleModel->getEventTypes();
foreach (const QmlProfilerDataModel::QmlEventData &event, eventList) {
// whitelist
if (!m_eventsModel->eventTypeAccepted(typesList[event.typeIndex()].rangeType))
if (!m_statisticsModel->eventTypeAccepted(typesList[event.typeIndex()].rangeType))
continue;
// level computation
......@@ -396,13 +390,13 @@ void QmlProfilerEventParentsModelProxy::loadData()
if (level > QmlDebug::Constants::QML_MIN_LEVEL && lastParent.contains(level-1))
parentTypeIndex = lastParent[level-1];
QmlEventRelativesMap &relativesMap = m_data[event.typeIndex()];
QmlEventRelativesMap::Iterator it = relativesMap.find(parentTypeIndex);
QmlStatisticsRelativesMap &relativesMap = m_data[event.typeIndex()];
QmlStatisticsRelativesMap::Iterator it = relativesMap.find(parentTypeIndex);
if (it != relativesMap.end()) {
it.value().calls++;
it.value().duration += event.duration();
} else {
QmlEventRelativesData parent = {
QmlStatisticsRelativesData parent = {
event.duration(),
1,
eventsInBindingLoop.contains(parentTypeIndex)
......@@ -415,16 +409,13 @@ void QmlProfilerEventParentsModelProxy::loadData()
}
}
QmlProfilerEventChildrenModelProxy::QmlProfilerEventChildrenModelProxy(QmlProfilerModelManager *modelManager,
QmlProfilerEventsModelProxy *eventsModel,
QObject *parent)
: QmlProfilerEventRelativesModelProxy(modelManager, eventsModel, parent)
QmlProfilerStatisticsChildrenModel::QmlProfilerStatisticsChildrenModel(
QmlProfilerModelManager *modelManager, QmlProfilerStatisticsModel *statisticsModel,
QObject *parent) :
QmlProfilerStatisticsRelativesModel(modelManager, statisticsModel, parent)
{}
QmlProfilerEventChildrenModelProxy::~QmlProfilerEventChildrenModelProxy()
{}
void QmlProfilerEventChildrenModelProxy::loadData()
void QmlProfilerStatisticsChildrenModel::loadData()
{
clear();
QmlProfilerDataModel *simpleModel = m_modelManager->qmlModel();
......@@ -436,7 +427,7 @@ void QmlProfilerEventChildrenModelProxy::loadData()
int level = QmlDebug::Constants::QML_MIN_LEVEL;
endtimesPerLevel[0] = 0;
const QSet<int> &eventsInBindingLoop = m_eventsModel->eventsInBindingLoop();
const QSet<int> &eventsInBindingLoop = m_statisticsModel->eventsInBindingLoop();
// compute parent-child relationship and call count
QHash<int, int> lastParent;
......@@ -444,7 +435,7 @@ void QmlProfilerEventChildrenModelProxy::loadData()
const QVector<QmlProfilerDataModel::QmlEventTypeData> &typesList = simpleModel->getEventTypes();
foreach (const QmlProfilerDataModel::QmlEventData &event, eventList) {
// whitelist
if (!m_eventsModel->eventTypeAccepted(typesList[event.typeIndex()].rangeType))
if (!m_statisticsModel->eventTypeAccepted(typesList[event.typeIndex()].rangeType))
continue;
// level computation
......@@ -462,13 +453,13 @@ void QmlProfilerEventChildrenModelProxy::loadData()
if (level > QmlDebug::Constants::QML_MIN_LEVEL && lastParent.contains(level-1))
parentId = lastParent[level-1];
QmlEventRelativesMap &relativesMap = m_data[parentId];
QmlEventRelativesMap::Iterator it = relativesMap.find(event.typeIndex());
QmlStatisticsRelativesMap &relativesMap = m_data[parentId];
QmlStatisticsRelativesMap::Iterator it = relativesMap.find(event.typeIndex());
if (it != relativesMap.end()) {
it.value().calls++;
it.value().duration += event.duration();
} else {
QmlEventRelativesData child = {
QmlStatisticsRelativesData child = {
event.duration(),
1,
eventsInBindingLoop.contains(parentId)
......@@ -481,7 +472,4 @@ void QmlProfilerEventChildrenModelProxy::loadData()
}
}
}
}
......@@ -28,9 +28,8 @@
**
****************************************************************************/
#ifndef QMLPROFILEREVENTSMODELPROXY_H
#define QMLPROFILEREVENTSMODELPROXY_H
#ifndef QMLPROFILERSTATISTICSMODEL_H
#define QMLPROFILERSTATISTICSMODEL_H
#include "qmlprofilerdatamodel.h"
#include "qmlprofilernotesmodel.h"
......@@ -40,13 +39,10 @@
#include <QHash>
#include <QVector>
namespace QmlProfiler {
class QmlProfilerModelManager;
namespace Internal {
class QmlProfilerEventsModelProxy : public QObject
class QmlProfilerStatisticsModel : public QObject
{
Q_OBJECT
public:
......@@ -67,8 +63,8 @@ public:
bool isBindingLoop;
};
QmlProfilerEventsModelProxy(QmlProfilerModelManager *modelManager, QObject *parent = 0);
~QmlProfilerEventsModelProxy();
QmlProfilerStatisticsModel(QmlProfilerModelManager *modelManager, QObject *parent = 0);
~QmlProfilerStatisticsModel();
void setEventTypeAccepted(QmlDebug::RangeType type, bool accepted);
bool eventTypeAccepted(QmlDebug::RangeType) const;
......@@ -88,7 +84,6 @@ signals:
private:
void loadData(qint64 rangeStart = -1, qint64 rangeEnd = -1);
const QSet<int> &eventsInBindingLoop() const;
private slots:
......@@ -96,38 +91,35 @@ private slots:
void notesChanged(int typeIndex);
private:
class QmlProfilerEventsModelProxyPrivate;
QmlProfilerEventsModelProxyPrivate *d;
class QmlProfilerStatisticsModelPrivate;
QmlProfilerStatisticsModelPrivate *d;
friend class QmlProfilerEventParentsModelProxy;
friend class QmlProfilerEventChildrenModelProxy;
friend class QmlProfilerStatisticsParentsModel;
friend class QmlProfilerStatisticsChildrenModel;
};
class QmlProfilerEventRelativesModelProxy : public QObject
class QmlProfilerStatisticsRelativesModel : public QObject
{
Q_OBJECT
public:
struct QmlEventRelativesData {
struct QmlStatisticsRelativesData {
qint64 duration;
qint64 calls;
bool isBindingLoop;
};
typedef QHash <int, QmlEventRelativesData> QmlEventRelativesMap;
typedef QHash <int, QmlStatisticsRelativesData> QmlStatisticsRelativesMap;
QmlProfilerEventRelativesModelProxy(QmlProfilerModelManager *modelManager,
QmlProfilerEventsModelProxy *eventsModel,
QmlProfilerStatisticsRelativesModel(QmlProfilerModelManager *modelManager,
QmlProfilerStatisticsModel *statisticsModel,
QObject *parent = 0);
~QmlProfilerEventRelativesModelProxy();
int count() const;
void clear();
const QmlEventRelativesMap &getData(int typeId) const;
const QmlStatisticsRelativesMap &getData(int typeId) const;
QVariantList getNotes(int typeId) const;
const QVector<QmlProfilerDataModel::QmlEventTypeData> &getTypes() const;
protected:
virtual void loadData() = 0;
......@@ -138,38 +130,35 @@ protected slots:
void dataChanged();
protected:
QHash <int, QmlEventRelativesMap> m_data;
QHash <int, QmlStatisticsRelativesMap> m_data;
QmlProfilerModelManager *m_modelManager;
QmlProfilerEventsModelProxy *m_eventsModel;
QmlProfilerStatisticsModel *m_statisticsModel;
};
class QmlProfilerEventParentsModelProxy : public QmlProfilerEventRelativesModelProxy
class QmlProfilerStatisticsParentsModel : public QmlProfilerStatisticsRelativesModel
{
Q_OBJECT
public:
QmlProfilerEventParentsModelProxy(QmlProfilerModelManager *modelManager,
QmlProfilerEventsModelProxy *eventsModel,
QmlProfilerStatisticsParentsModel(QmlProfilerModelManager *modelManager,
QmlProfilerStatisticsModel *statisticsModel,
QObject *parent = 0);
~QmlProfilerEventParentsModelProxy();
protected:
virtual void loadData();
};
class QmlProfilerEventChildrenModelProxy : public QmlProfilerEventRelativesModelProxy
class QmlProfilerStatisticsChildrenModel : public QmlProfilerStatisticsRelativesModel
{
Q_OBJECT
public:
QmlProfilerEventChildrenModelProxy(QmlProfilerModelManager *modelManager,
QmlProfilerEventsModelProxy *eventsModel,
QmlProfilerStatisticsChildrenModel(QmlProfilerModelManager *modelManager,
QmlProfilerStatisticsModel *statisticsModel,
QObject *parent = 0);
~QmlProfilerEventChildrenModelProxy();
protected:
virtual void loadData();
};
}
}
#endif
#endif // QMLPROFILERSTATISTICSMODEL_H
......@@ -124,7 +124,7 @@ public:
QmlProfilerStatisticsRelativesView *m_eventChildren;
QmlProfilerStatisticsRelativesView *m_eventParents;
QmlProfilerEventsModelProxy *modelProxy;
QmlProfilerStatisticsModel *model;
qint64 rangeStart;
qint64 rangeEnd;
};
......@@ -197,19 +197,19 @@ QmlProfilerStatisticsView::QmlProfilerStatisticsView(QWidget *parent, QmlProfile
{
setObjectName(QLatin1String("QmlProfilerStatisticsView"));
d->modelProxy = new QmlProfilerEventsModelProxy(profilerModelManager, this);
d->model = new QmlProfilerStatisticsModel(profilerModelManager, this);
d->m_eventTree = new QmlProfilerStatisticsMainView(this, d->modelProxy);
d->m_eventTree = new QmlProfilerStatisticsMainView(this, d->model);
connect(d->m_eventTree, &QmlProfilerStatisticsMainView::gotoSourceLocation,
this, &QmlProfilerStatisticsView::gotoSourceLocation);
connect(d->m_eventTree, &QmlProfilerStatisticsMainView::typeSelected,
this, &QmlProfilerStatisticsView::typeSelected);
d->m_eventChildren = new QmlProfilerStatisticsRelativesView(
new QmlProfilerEventChildrenModelProxy(profilerModelManager, d->modelProxy, this),
new QmlProfilerStatisticsChildrenModel(profilerModelManager, d->model, this),
this);
d->m_eventParents = new QmlProfilerStatisticsRelativesView(
new QmlProfilerEventParentsModelProxy(profilerModelManager, d->modelProxy, this),
new QmlProfilerStatisticsParentsModel(profilerModelManager, d->model, this),
this);
connect(d->m_eventTree, &QmlProfilerStatisticsMainView::typeSelected,
d->m_eventChildren, &QmlProfilerStatisticsRelativesView::displayType);
......@@ -249,7 +249,7 @@ QmlProfilerStatisticsView::QmlProfilerStatisticsView(QWidget *parent, QmlProfile
QmlProfilerStatisticsView::~QmlProfilerStatisticsView()
{
delete d->modelProxy;
delete d->model;
delete d;
}
......@@ -264,7 +264,7 @@ void QmlProfilerStatisticsView::restrictToRange(qint64 rangeStart, qint64 rangeE
{
d->rangeStart = rangeStart;
d->rangeEnd = rangeEnd;
d->modelProxy->limitToRange(rangeStart, rangeEnd);
d->model->limitToRange(rangeStart, rangeEnd);
}
QModelIndex QmlProfilerStatisticsView::selectedModelIndex() const
......@@ -358,9 +358,9 @@ void QmlProfilerStatisticsView::onVisibleFeaturesChanged(quint64 features)
RangeType range = static_cast<RangeType>(i);
quint64 featureFlag = 1ULL << featureFromRangeType(range);
if (QmlDebug::Constants::QML_JS_RANGE_FEATURES & featureFlag)
d->modelProxy->setEventTypeAccepted(range, features & featureFlag);
d->model->setEventTypeAccepted(range, features & featureFlag);
}
d->modelProxy->limitToRange(d->rangeStart, d->rangeEnd);
d->model->limitToRange(d->rangeStart, d->rangeEnd);
}
bool QmlProfilerStatisticsView::isRestrictedToRange() const
......@@ -390,7 +390,7 @@ public:
QmlProfilerStatisticsMainView *q;
QmlProfilerEventsModelProxy *modelProxy;
QmlProfilerStatisticsModel *model;
QStandardItemModel *m_model;
QList<bool> m_fieldShown;
QHash<int, int> m_columnIndex; // maps field enum to column index
......@@ -399,7 +399,7 @@ public:
};
QmlProfilerStatisticsMainView::QmlProfilerStatisticsMainView(
QWidget *parent, QmlProfilerEventsModelProxy *modelProxy) :
QWidget *parent, QmlProfilerStatisticsModel *model) :
Utils::TreeView(parent), d(new QmlProfilerStatisticsMainViewPrivate(this))
{