forked from qt-creator/qt-creator
QmlProfiler: Add special model for notes
Change-Id: Ia0acbc5e0a02563cf497594b67a5f7a67488fb79 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#include "qmlprofilerdatamodel.h"
|
||||
#include "qmlprofilerbasemodel_p.h"
|
||||
#include "qmlprofilermodelmanager.h"
|
||||
#include "notesmodel.h"
|
||||
#include <qmldebug/qmlprofilereventtypes.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <QUrl>
|
||||
@@ -46,6 +47,7 @@ public:
|
||||
QmlProfilerDataModelPrivate(QmlProfilerDataModel *qq) : QmlProfilerBaseModelPrivate(qq) {}
|
||||
QVector<QmlEventTypeData> eventTypes;
|
||||
QVector<QmlEventData> eventList;
|
||||
QVector<QmlEventNoteData> eventNotes;
|
||||
QHash<QmlEventTypeData, int> eventTypeIds;
|
||||
private:
|
||||
Q_DECLARE_PUBLIC(QmlProfilerDataModel)
|
||||
@@ -127,6 +129,12 @@ const QVector<QmlProfilerDataModel::QmlEventTypeData> &QmlProfilerDataModel::get
|
||||
return d->eventTypes;
|
||||
}
|
||||
|
||||
const QVector<QmlProfilerDataModel::QmlEventNoteData> &QmlProfilerDataModel::getEventNotes() const
|
||||
{
|
||||
Q_D(const QmlProfilerDataModel);
|
||||
return d->eventNotes;
|
||||
}
|
||||
|
||||
void QmlProfilerDataModel::setData(const QVector<QmlProfilerDataModel::QmlEventTypeData> &types,
|
||||
const QVector<QmlProfilerDataModel::QmlEventData> &events)
|
||||
{
|
||||
@@ -139,6 +147,12 @@ void QmlProfilerDataModel::setData(const QVector<QmlProfilerDataModel::QmlEventT
|
||||
d->modelManager->modelProxyCountUpdated(d->modelId, 1, 2);
|
||||
}
|
||||
|
||||
void QmlProfilerDataModel::setNoteData(const QVector<QmlProfilerDataModel::QmlEventNoteData> ¬es)
|
||||
{
|
||||
Q_D(QmlProfilerDataModel);
|
||||
d->eventNotes = notes;
|
||||
}
|
||||
|
||||
int QmlProfilerDataModel::count() const
|
||||
{
|
||||
Q_D(const QmlProfilerDataModel);
|
||||
@@ -151,6 +165,7 @@ void QmlProfilerDataModel::clear()
|
||||
d->eventList.clear();
|
||||
d->eventTypes.clear();
|
||||
d->eventTypeIds.clear();
|
||||
d->eventNotes.clear();
|
||||
// This call emits changed(). Don't emit it again here.
|
||||
QmlProfilerBaseModel::clear();
|
||||
}
|
||||
|
Reference in New Issue
Block a user