QmlProfiler: Split AbstractTimelineModel in two classes

We need a general purpose TimelineModel and a specialized
QmlProfilerTimelineModel.

Change-Id: I2da02d65efa11e160cab5fa9f8a21075beb0e2bf
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2014-10-28 19:01:43 +01:00
committed by Ulf Hermann
parent af84726c51
commit 10d942e268
22 changed files with 797 additions and 748 deletions

View File

@@ -31,7 +31,7 @@
#ifndef NOTESMODEL_H
#define NOTESMODEL_H
#include "abstracttimelinemodel.h"
#include "qmlprofilertimelinemodel.h"
#include "qmlprofilermodelmanager.h"
#include <QList>
#include <QHash>
@@ -54,7 +54,7 @@ public:
int count() const;
void setModelManager(QmlProfilerModelManager *modelManager);
void addTimelineModel(const AbstractTimelineModel *timelineModel);
void addTimelineModel(const QmlProfilerTimelineModel *timelineModel);
Q_INVOKABLE int typeId(int index) const;
Q_INVOKABLE QString text(int index) const;
@@ -86,7 +86,7 @@ private slots:
protected:
QmlProfilerModelManager *m_modelManager;
QList<Note> m_data;
QHash<int, const AbstractTimelineModel *> m_timelineModels;
QHash<int, const QmlProfilerTimelineModel *> m_timelineModels;
bool m_modified;
int add(int typeId, qint64 startTime, qint64 duration, const QString &text);