Commit 58e3c9ed authored by Ulf Hermann's avatar Ulf Hermann
Browse files

QmlProfiler: Unify QML and V8 data models



There is no real reason for the existence of a QmlProfilerSimpleModel.

Change-Id: I6419973cfad5564913bf92f17fdcf7e529af4b01
Reviewed-by: default avatarKai Koehne <kai.koehne@digia.com>
parent 133199a0
......@@ -53,7 +53,7 @@ void AbstractTimelineModel::setModelManager(QmlProfilerModelManager *modelManage
{
Q_D(AbstractTimelineModel);
d->modelManager = modelManager;
connect(d->modelManager->simpleModel(),SIGNAL(changed()),this,SLOT(dataChanged()));
connect(d->modelManager->qmlModel(),SIGNAL(changed()),this,SLOT(dataChanged()));
d->modelId = d->modelManager->registerModelProxy();
}
......
......@@ -33,7 +33,7 @@
#include "qmlprofiler_global.h"
#include "qmlprofilermodelmanager.h"
#include "qmlprofilersimplemodel.h"
#include "qmlprofilerdatamodel.h"
#include <QObject>
#include <QVariant>
#include <QColor>
......@@ -79,7 +79,7 @@ public:
Q_INVOKABLE virtual QColor getColor(int index) const = 0;
Q_INVOKABLE virtual const QVariantList getLabelsForCategory(int category) const = 0;
Q_INVOKABLE virtual const QVariantList getEventDetails(int index) const = 0;
virtual bool eventAccepted(const QmlProfilerSimpleModel::QmlEventData &event) const = 0;
virtual bool eventAccepted(const QmlProfilerDataModel::QmlEventData &event) const = 0;
virtual int getEventType(int index) const = 0;
virtual int getEventCategory(int index) const = 0;
virtual int getEventRow(int index) const = 0;
......
......@@ -22,8 +22,6 @@ SOURCES += \
qmlprofilerstatewidget.cpp \
qmlprofilerruncontrolfactory.cpp \
qmlprofilermodelmanager.cpp \
qmlprofilersimplemodel.cpp \
qmlprofilerprocessedmodel.cpp \
qmlprofilereventsmodelproxy.cpp \
qmlprofilertimelinemodelproxy.cpp \
qmlprofilertreeview.cpp \
......@@ -33,7 +31,8 @@ SOURCES += \
qmlprofilerpainteventsmodelproxy.cpp \
sortedtimelinemodel.cpp \
qmlprofilerbasemodel.cpp \
singlecategorytimelinemodel.cpp
singlecategorytimelinemodel.cpp \
qmlprofilerdatamodel.cpp
HEADERS += \
qmlprofilerconstants.h \
......@@ -56,8 +55,6 @@ HEADERS += \
qmlprofilerstatewidget.h \
qmlprofilerruncontrolfactory.h \
qmlprofilermodelmanager.h \
qmlprofilersimplemodel.h \
qmlprofilerprocessedmodel.h \
qmlprofilereventsmodelproxy.h \
qmlprofilertimelinemodelproxy.h \
qmlprofilertreeview.h \
......@@ -69,7 +66,8 @@ HEADERS += \
qmlprofilerbasemodel.h \
abstracttimelinemodel_p.h \
singlecategorytimelinemodel.h \
singlecategorytimelinemodel_p.h
singlecategorytimelinemodel_p.h \
qmlprofilerdatamodel.h
RESOURCES += \
qml/qmlprofiler.qrc
......
......@@ -31,6 +31,7 @@ QtcPlugin {
"qmlprofilerbasemodel.cpp", "qmlprofilerbasemodel.h",
"qmlprofilerclientmanager.cpp", "qmlprofilerclientmanager.h",
"qmlprofilerconstants.h",
"qmlprofilerdatamodel.cpp", "qmlprofilerdatamodel.h",
"qmlprofilerdetailsrewriter.cpp", "qmlprofilerdetailsrewriter.h",
"qmlprofilerengine.cpp", "qmlprofilerengine.h",
"qmlprofilereventsmodelproxy.cpp", "qmlprofilereventsmodelproxy.h",
......@@ -38,9 +39,7 @@ QtcPlugin {
"qmlprofilermodelmanager.cpp", "qmlprofilermodelmanager.h",
"qmlprofilerpainteventsmodelproxy.h", "qmlprofilerpainteventsmodelproxy.cpp",
"qmlprofilerplugin.cpp", "qmlprofilerplugin.h",
"qmlprofilerprocessedmodel.cpp", "qmlprofilerprocessedmodel.h",
"qmlprofilerruncontrolfactory.cpp", "qmlprofilerruncontrolfactory.h",
"qmlprofilersimplemodel.cpp", "qmlprofilersimplemodel.h",
"qmlprofilerstatemanager.cpp", "qmlprofilerstatemanager.h",
"qmlprofilerstatewidget.cpp", "qmlprofilerstatewidget.h",
"qmlprofilertimelinemodelproxy.cpp", "qmlprofilertimelinemodelproxy.h",
......
......@@ -32,21 +32,42 @@
namespace QmlProfiler {
QmlProfilerBaseModel::QmlProfilerBaseModel(QmlProfilerModelManager *manager) :
m_modelManager(manager), m_processingDone(false)
QmlProfilerBaseModel::QmlProfilerBaseModel(Utils::FileInProjectFinder *fileFinder,
QmlProfilerModelManager *manager) :
m_modelManager(manager), m_processingDone(false), m_detailsRewriter(this, fileFinder)
{
Q_ASSERT(m_modelManager);
m_modelId = m_modelManager->registerModelProxy();
connect(&m_detailsRewriter, SIGNAL(rewriteDetailsString(int,QString)),
this, SLOT(detailsChanged(int,QString)));
connect(&m_detailsRewriter, SIGNAL(eventDetailsChanged()),
this, SLOT(detailsDone()));
}
void QmlProfilerBaseModel::clear()
{
m_detailsRewriter.clearRequests();
m_modelManager->modelProxyCountUpdated(m_modelId, 0, 1);
m_processingDone = false;
emit changed();
}
void QmlProfilerBaseModel::complete()
{
m_detailsRewriter.reloadDocuments();
}
QString QmlProfilerBaseModel::formatTime(qint64 timestamp)
{
if (timestamp < 1e6)
return QString::number(timestamp/1e3f,'f',3) + trUtf8(" \xc2\xb5s");
if (timestamp < 1e9)
return QString::number(timestamp/1e6f,'f',3) + tr(" ms");
return QString::number(timestamp/1e9f,'f',3) + tr(" s");
}
void QmlProfilerBaseModel::detailsDone()
{
emit changed();
m_processingDone = true;
......
......@@ -31,6 +31,7 @@
#define QMLPROFILERBASEMODEL_H
#include "qmlprofiler_global.h"
#include "qmlprofilerdetailsrewriter.h"
#include <QObject>
namespace QmlProfiler {
......@@ -40,7 +41,7 @@ class QmlProfilerModelManager;
class QMLPROFILER_EXPORT QmlProfilerBaseModel : public QObject {
Q_OBJECT
public:
QmlProfilerBaseModel(QmlProfilerModelManager *manager);
QmlProfilerBaseModel(Utils::FileInProjectFinder *fileFinder, QmlProfilerModelManager *manager);
virtual ~QmlProfilerBaseModel() {}
virtual void complete();
......@@ -48,10 +49,17 @@ public:
virtual bool isEmpty() const = 0;
bool processingDone() const { return m_processingDone; }
static QString formatTime(qint64 timestamp);
protected:
QmlProfilerModelManager *m_modelManager;
int m_modelId;
bool m_processingDone;
Internal::QmlProfilerDetailsRewriter m_detailsRewriter;
protected slots:
virtual void detailsChanged(int requestId, const QString &newString) = 0;
virtual void detailsDone();
signals:
void changed();
......
......@@ -27,7 +27,7 @@
**
****************************************************************************/
#include "qmlprofilerprocessedmodel.h"
#include "qmlprofilerdatamodel.h"
#include "qmlprofilermodelmanager.h"
#include <qmldebug/qmlprofilereventtypes.h>
#include <utils/qtcassert.h>
......@@ -35,13 +35,12 @@
#include <QDebug>
namespace QmlProfiler {
namespace Internal {
QmlDebug::QmlEventLocation getLocation(const QmlProfilerSimpleModel::QmlEventData &event);
QString getDisplayName(const QmlProfilerSimpleModel::QmlEventData &event);
QString getInitialDetails(const QmlProfilerSimpleModel::QmlEventData &event);
QmlDebug::QmlEventLocation getLocation(const QmlProfilerDataModel::QmlEventData &event);
QString getDisplayName(const QmlProfilerDataModel::QmlEventData &event);
QString getInitialDetails(const QmlProfilerDataModel::QmlEventData &event);
QmlDebug::QmlEventLocation getLocation(const QmlProfilerSimpleModel::QmlEventData &event)
QmlDebug::QmlEventLocation getLocation(const QmlProfilerDataModel::QmlEventData &event)
{
QmlDebug::QmlEventLocation eventLocation = event.location;
if ((event.eventType == QmlDebug::Creating || event.eventType == QmlDebug::Compiling)
......@@ -53,14 +52,14 @@ QmlDebug::QmlEventLocation getLocation(const QmlProfilerSimpleModel::QmlEventDat
return eventLocation;
}
QString getDisplayName(const QmlProfilerSimpleModel::QmlEventData &event)
QString getDisplayName(const QmlProfilerDataModel::QmlEventData &event)
{
const QmlDebug::QmlEventLocation eventLocation = getLocation(event);
QString displayName;
// generate hash
if (eventLocation.filename.isEmpty()) {
displayName = QmlProfilerProcessedModel::tr("<bytecode>");
displayName = QmlProfilerDataModel::tr("<bytecode>");
} else {
const QString filePath = QUrl(eventLocation.filename).path();
displayName = filePath.mid(filePath.lastIndexOf(QLatin1Char('/')) + 1) + QLatin1Char(':') +
......@@ -70,16 +69,16 @@ QString getDisplayName(const QmlProfilerSimpleModel::QmlEventData &event)
return displayName;
}
QString getInitialDetails(const QmlProfilerSimpleModel::QmlEventData &event)
QString getInitialDetails(const QmlProfilerDataModel::QmlEventData &event)
{
QString details;
// generate details string
if (event.data.isEmpty())
details = QmlProfilerProcessedModel::tr("Source code not available.");
details = QmlProfilerDataModel::tr("Source code not available.");
else {
details = event.data.join(QLatin1String(" ")).replace(QLatin1Char('\n'),QLatin1Char(' ')).simplified();
if (details.isEmpty()) {
details = QmlProfilerProcessedModel::tr("anonymous function");
details = QmlProfilerDataModel::tr("anonymous function");
} else {
QRegExp rewrite(QLatin1String("\\(function \\$(\\w+)\\(\\) \\{ (return |)(.+) \\}\\)"));
bool match = rewrite.exactMatch(details);
......@@ -94,51 +93,54 @@ QString getInitialDetails(const QmlProfilerSimpleModel::QmlEventData &event)
}
bool compareStartTimes(const QmlProfilerSimpleModel::QmlEventData &t1, const QmlProfilerSimpleModel::QmlEventData &t2)
bool compareStartTimes(const QmlProfilerDataModel::QmlEventData &t1, const QmlProfilerDataModel::QmlEventData &t2)
{
return t1.startTime < t2.startTime;
}
//////////////////////////////////////////////////////////////////////////////
QmlProfilerProcessedModel::QmlProfilerProcessedModel(Utils::FileInProjectFinder *fileFinder, QmlProfilerModelManager *parent)
: QmlProfilerSimpleModel(parent)
, m_detailsRewriter(new QmlProfilerDetailsRewriter(this, fileFinder))
QmlProfilerDataModel::QmlProfilerDataModel(Utils::FileInProjectFinder *fileFinder,
QmlProfilerModelManager *parent)
: QmlProfilerBaseModel(fileFinder, parent)
{
m_processedModelId = m_modelManager->registerModelProxy();
// The document loading is very expensive.
m_modelManager->setProxyCountWeight(m_processedModelId, 3);
m_modelManager->setProxyCountWeight(m_modelId, 4);
}
connect(m_detailsRewriter, SIGNAL(rewriteDetailsString(int,QString)),
this, SLOT(detailsChanged(int,QString)));
connect(m_detailsRewriter, SIGNAL(eventDetailsChanged()),
this, SLOT(detailsDone()));
const QVector<QmlProfilerDataModel::QmlEventData> &QmlProfilerDataModel::getEvents() const
{
return m_eventList;
}
QmlProfilerProcessedModel::~QmlProfilerProcessedModel()
int QmlProfilerDataModel::count() const
{
return m_eventList.count();
}
void QmlProfilerProcessedModel::clear()
void QmlProfilerDataModel::clear()
{
m_detailsRewriter->clearRequests();
m_modelManager->modelProxyCountUpdated(m_processedModelId, 0, 1);
m_eventList.clear();
// This call emits changed(). Don't emit it again here.
QmlProfilerSimpleModel::clear();
QmlProfilerBaseModel::clear();
}
bool QmlProfilerDataModel::isEmpty() const
{
return m_eventList.isEmpty();
}
void QmlProfilerProcessedModel::complete()
void QmlProfilerDataModel::complete()
{
m_modelManager->modelProxyCountUpdated(m_processedModelId, 0, 1);
// post-processing
// sort events by start time
qSort(eventList.begin(), eventList.end(), compareStartTimes);
qSort(m_eventList.begin(), m_eventList.end(), compareStartTimes);
// rewrite strings
int n = eventList.count();
int n = m_eventList.count();
for (int i = 0; i < n; i++) {
QmlEventData *event = &eventList[i];
QmlEventData *event = &m_eventList[i];
event->location = getLocation(*event);
event->displayName = getDisplayName(*event);
event->data = QStringList() << getInitialDetails(*event);
......@@ -158,30 +160,62 @@ void QmlProfilerProcessedModel::complete()
if (event->location.column == -1)
continue;
m_detailsRewriter->requestDetailsForLocation(i, event->location);
m_modelManager->modelProxyCountUpdated(m_processedModelId, i, n);
m_detailsRewriter.requestDetailsForLocation(i, event->location);
m_modelManager->modelProxyCountUpdated(m_modelId, i + n, n * 2);
}
// Allow QmlProfilerBaseModel::complete() only after documents have been reloaded to avoid
// Allow changed() event only after documents have been reloaded to avoid
// unnecessary updates of child models.
m_detailsRewriter->reloadDocuments();
QmlProfilerBaseModel::complete();
}
void QmlProfilerProcessedModel::detailsChanged(int requestId, const QString &newString)
void QmlProfilerDataModel::addQmlEvent(int type, int bindingType, qint64 startTime,
qint64 duration, const QStringList &data,
const QmlDebug::QmlEventLocation &location,
qint64 ndata1, qint64 ndata2, qint64 ndata3,
qint64 ndata4, qint64 ndata5)
{
QTC_ASSERT(requestId < eventList.count(), return);
QString displayName;
if (type == QmlDebug::Painting && bindingType == QmlDebug::AnimationFrame) {
displayName = tr("Animations");
} else {
displayName = QString::fromLatin1("%1:%2").arg(
location.filename,
QString::number(location.line));
}
QmlEventData *event = &eventList[requestId];
event->data = QStringList(newString);
QmlEventData eventData = {displayName, type, bindingType, startTime, duration, data, location,
ndata1, ndata2, ndata3, ndata4, ndata5};
m_eventList.append(eventData);
m_modelManager->modelProxyCountUpdated(m_modelId, startTime,
m_modelManager->estimatedProfilingTime() * 2);
}
void QmlProfilerProcessedModel::detailsDone()
QString QmlProfilerDataModel::getHashString(const QmlProfilerDataModel::QmlEventData &event)
{
m_modelManager->modelProxyCountUpdated(m_processedModelId, 1, 1);
// The child models are supposed to synchronously update on changed(), triggered by
// QmlProfilerBaseModel::complete().
QmlProfilerSimpleModel::complete();
return QString::fromLatin1("%1:%2:%3:%4:%5").arg(
event.location.filename,
QString::number(event.location.line),
QString::number(event.location.column),
QString::number(event.eventType),
QString::number(event.bindingType));
}
qint64 QmlProfilerDataModel::lastTimeMark() const
{
if (m_eventList.isEmpty())
return 0;
return m_eventList.last().startTime + m_eventList.last().duration;
}
void QmlProfilerDataModel::detailsChanged(int requestId, const QString &newString)
{
QTC_ASSERT(requestId < m_eventList.count(), return);
QmlEventData *event = &m_eventList[requestId];
event->data = QStringList(newString);
}
}
......@@ -27,24 +27,14 @@
**
****************************************************************************/
#ifndef QMLPROFILERSIMPLEMODEL_H
#define QMLPROFILERSIMPLEMODEL_H
#ifndef QMLPROFILERDATAMODEL_H
#define QMLPROFILERDATAMODEL_H
#include "qmlprofiler_global.h"
#include "qmlprofilerbasemodel.h"
#include <qmldebug/qmlprofilereventlocation.h>
#include <QObject>
#include <QVector>
#include <QStringList>
namespace QmlProfiler {
class QmlProfilerModelManager;
// stores the data from the client as-is
class QMLPROFILER_EXPORT QmlProfilerSimpleModel : public QmlProfilerBaseModel
class QMLPROFILER_EXPORT QmlProfilerDataModel : public QmlProfilerBaseModel
{
Q_OBJECT
public:
......@@ -63,22 +53,24 @@ public:
qint64 numericData5;
};
explicit QmlProfilerSimpleModel(QmlProfilerModelManager *parent);
~QmlProfilerSimpleModel();
explicit QmlProfilerDataModel(Utils::FileInProjectFinder *fileFinder, QmlProfilerModelManager *parent = 0);
virtual void clear();
bool isEmpty() const;
const QVector<QmlEventData> &getEvents() const;
int count() const;
void addQmlEvent(int type, int bindingType, qint64 startTime, qint64 duration, const QStringList &data, const QmlDebug::QmlEventLocation &location,
virtual void clear();
virtual bool isEmpty() const;
virtual void complete();
void addQmlEvent(int type, int bindingType, qint64 startTime, qint64 duration,
const QStringList &data, const QmlDebug::QmlEventLocation &location,
qint64 ndata1, qint64 ndata2, qint64 ndata3, qint64 ndata4, qint64 ndata5);
static QString getHashString(const QmlProfilerDataModel::QmlEventData &event);
qint64 lastTimeMark() const;
static QString getHashString(const QmlProfilerSimpleModel::QmlEventData &event);
static QString formatTime(qint64 timestamp);
protected slots:
void detailsChanged(int requestId, const QString &newString);
protected:
QVector<QmlEventData> eventList;
private:
QVector<QmlEventData> m_eventList;
};
}
......
......@@ -29,7 +29,7 @@
#include "qmlprofilereventsmodelproxy.h"
#include "qmlprofilermodelmanager.h"
#include "qmlprofilersimplemodel.h"
#include "qmlprofilerdatamodel.h"
#include <utils/qtcassert.h>
......@@ -66,7 +66,7 @@ QmlProfilerEventsModelProxy::QmlProfilerEventsModelProxy(QmlProfilerModelManager
: QObject(parent), d(new QmlProfilerEventsModelProxyPrivate(this))
{
d->modelManager = modelManager;
connect(modelManager->simpleModel(), SIGNAL(changed()), this, SLOT(dataChanged()));
connect(modelManager->qmlModel(), SIGNAL(changed()), this, SLOT(dataChanged()));
d->modelId = modelManager->registerModelProxy();
// We're iterating twice in loadData.
......@@ -120,16 +120,16 @@ void QmlProfilerEventsModelProxy::loadData(qint64 rangeStart, qint64 rangeEnd)
const bool checkRanges = (rangeStart != -1) && (rangeEnd != -1);
const QVector<QmlProfilerSimpleModel::QmlEventData> eventList
= d->modelManager->simpleModel()->getEvents();
const QVector<QmlProfilerDataModel::QmlEventData> eventList
= d->modelManager->qmlModel()->getEvents();
// used by binding loop detection
typedef QPair<QString, const QmlProfilerSimpleModel::QmlEventData*> CallStackEntry;
typedef QPair<QString, const QmlProfilerDataModel::QmlEventData*> CallStackEntry;
QStack<CallStackEntry> callStack;
callStack.push(CallStackEntry(QString(), 0)); // artificial root
for (int i = 0; i < eventList.size(); ++i) {
const QmlProfilerSimpleModel::QmlEventData *event = &eventList[i];
const QmlProfilerDataModel::QmlEventData *event = &eventList[i];
if (!d->acceptedTypes.contains(event->eventType))
continue;
......@@ -141,7 +141,7 @@ void QmlProfilerEventsModelProxy::loadData(qint64 rangeStart, qint64 rangeEnd)
}
// put event in hash
QString hash = QmlProfilerSimpleModel::getHashString(*event);
QString hash = QmlProfilerDataModel::getHashString(*event);
if (!d->data.contains(hash)) {
QmlEventStats stats = {
event->displayName,
......@@ -190,7 +190,7 @@ void QmlProfilerEventsModelProxy::loadData(qint64 rangeStart, qint64 rangeEnd)
//
// binding loop detection
//
const QmlProfilerSimpleModel::QmlEventData *potentialParent = callStack.top().second;
const QmlProfilerDataModel::QmlEventData *potentialParent = callStack.top().second;
while (potentialParent
&& !(potentialParent->startTime + potentialParent->duration > event->startTime)) {
callStack.pop();
......@@ -275,7 +275,7 @@ QmlProfilerEventRelativesModelProxy::QmlProfilerEventRelativesModelProxy(QmlProf
{
QTC_CHECK(modelManager);
m_modelManager = modelManager;
connect(modelManager->simpleModel(), SIGNAL(changed()), this, SLOT(dataChanged()));
connect(modelManager->qmlModel(), SIGNAL(changed()), this, SLOT(dataChanged()));
QTC_CHECK(eventsModel);
m_eventsModel = eventsModel;
......@@ -325,13 +325,13 @@ QmlProfilerEventParentsModelProxy::~QmlProfilerEventParentsModelProxy()
void QmlProfilerEventParentsModelProxy::loadData()
{
clear();
QmlProfilerSimpleModel *simpleModel = m_modelManager->simpleModel();
QmlProfilerDataModel *simpleModel = m_modelManager->qmlModel();
if (simpleModel->isEmpty())
return;
QHash<QString, QmlProfilerSimpleModel::QmlEventData> cachedEvents;
QHash<QString, QmlProfilerDataModel::QmlEventData> cachedEvents;
QString rootEventName = tr("<program>");
QmlProfilerSimpleModel::QmlEventData rootEvent = {
QmlProfilerDataModel::QmlEventData rootEvent = {
rootEventName,
QmlDebug::Binding,
0,
......@@ -353,8 +353,8 @@ void QmlProfilerEventParentsModelProxy::loadData()
// compute parent-child relationship and call count
QHash<int, QString> lastParent;
//for (int index = fromIndex; index <= toIndex; index++) {
const QVector<QmlProfilerSimpleModel::QmlEventData> eventList = simpleModel->getEvents();
foreach (const QmlProfilerSimpleModel::QmlEventData &event, eventList) {
const QVector<QmlProfilerDataModel::QmlEventData> eventList = simpleModel->getEvents();
foreach (const QmlProfilerDataModel::QmlEventData &event, eventList) {
// whitelist
if (!m_acceptedTypes.contains(event.eventType))
continue;
......@@ -370,7 +370,7 @@ void QmlProfilerEventParentsModelProxy::loadData()
QString parentHash = rootEventName;
QString eventHash = QmlProfilerSimpleModel::getHashString(event);
QString eventHash = QmlProfilerDataModel::getHashString(event);
// save in cache
if (!cachedEvents.contains(eventHash))
......@@ -379,7 +379,7 @@ void QmlProfilerEventParentsModelProxy::loadData()
if (level > QmlDebug::Constants::QML_MIN_LEVEL && lastParent.contains(level-1))
parentHash = lastParent[level-1];
QmlProfilerSimpleModel::QmlEventData *parentEvent = &(cachedEvents[parentHash]);
QmlProfilerDataModel::QmlEventData *parentEvent = &(cachedEvents[parentHash]);
// generate placeholder if needed
if (!m_data.contains(eventHash))
......@@ -418,7 +418,7 @@ QmlProfilerEventChildrenModelProxy::~QmlProfilerEventChildrenModelProxy()
void QmlProfilerEventChildrenModelProxy::loadData()
{
clear();
QmlProfilerSimpleModel *simpleModel = m_modelManager->simpleModel();
QmlProfilerDataModel *simpleModel = m_modelManager->qmlModel();
if (simpleModel->isEmpty())
return;
......@@ -433,8 +433,8 @@ void QmlProfilerEventChildrenModelProxy::loadData()
// compute parent-child relationship and call count
QHash<int, QString> lastParent;
const QVector<QmlProfilerSimpleModel::QmlEventData> eventList = simpleModel->getEvents();
foreach (const QmlProfilerSimpleModel::QmlEventData &event, eventList) {
const QVector<QmlProfilerDataModel::QmlEventData> eventList = simpleModel->getEvents();
foreach (const QmlProfilerDataModel::QmlEventData &event, eventList) {
// whitelist
if (!m_acceptedTypes.contains(event.eventType))
continue;
......@@ -449,7 +449,7 @@ void QmlProfilerEventChildrenModelProxy::loadData()
endtimesPerLevel[level] = event.startTime + event.duration;
QString parentHash = rootEventName;
QString eventHash = QmlProfilerSimpleModel::getHashString(event);
QString eventHash = QmlProfilerDataModel::getHashString(event);
if (level > QmlDebug::Constants::QML_MIN_LEVEL && lastParent.contains(level-1))
parentHash = lastParent[level-1];
......
......@@ -31,7 +31,7 @@
#ifndef QMLPROFILEREVENTSMODELPROXY_H
#define QMLPROFILEREVENTSMODELPROXY_H
#include "qmlprofilersimplemodel.h"
#include "qmlprofilerdatamodel.h"
#include <QObject>