QmlProfiler: Move notes into the notes model

There is not reason to keep them in the general data model and cross
reference between the models all the time.

Change-Id: Ic77c518928dcd6234555cb3f6a830bcc3dc4a1a4
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2016-04-26 12:26:46 +02:00
parent d6f351b689
commit 54b1106f4b
6 changed files with 32 additions and 37 deletions

View File

@@ -26,6 +26,7 @@
#pragma once
#include "qmlprofilermodelmanager.h"
#include "qmlnote.h"
#include "timeline/timelinenotesmodel.h"
#include <QList>
#include <QHash>
@@ -36,12 +37,15 @@ class QMLPROFILER_EXPORT QmlProfilerNotesModel : public Timeline::TimelineNotesM
public:
QmlProfilerNotesModel(QObject *parent);
void setModelManager(QmlProfilerModelManager *modelManager);
void loadData();
void saveData();
const QVector<QmlNote> &notes() const;
void setNotes(const QVector<QmlNote> &notes);
void clear();
protected:
QmlProfilerModelManager *m_modelManager;
QVector<QmlNote> m_notes;
int add(int typeId, qint64 startTime, qint64 duration, const QString &text);
};