forked from qt-creator/qt-creator
QmlProfiler: Fix the naming scheme for events and event types
Move them out of the QmlProfilerDataModel class, drop the "Data" suffix, and rename symbols that refer to them in order to call them by their names. Change-Id: I41151359921b325edb79111371083c4185bd148b Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
@@ -70,10 +70,9 @@ void QmlProfilerNotesModel::loadData()
|
||||
{
|
||||
blockSignals(true);
|
||||
clear();
|
||||
const QVector<QmlProfilerDataModel::QmlEventNoteData> ¬es =
|
||||
m_modelManager->qmlModel()->getEventNotes();
|
||||
const QVector<QmlNote> ¬es = m_modelManager->qmlModel()->notes();
|
||||
for (int i = 0; i != notes.size(); ++i) {
|
||||
const QmlProfilerDataModel::QmlEventNoteData ¬e = notes[i];
|
||||
const QmlNote ¬e = notes[i];
|
||||
add(note.typeIndex, note.startTime, note.duration, note.text);
|
||||
}
|
||||
resetModified();
|
||||
@@ -83,14 +82,14 @@ void QmlProfilerNotesModel::loadData()
|
||||
|
||||
void QmlProfilerNotesModel::saveData()
|
||||
{
|
||||
QVector<QmlProfilerDataModel::QmlEventNoteData> notes;
|
||||
QVector<QmlNote> notes;
|
||||
for (int i = 0; i < count(); ++i) {
|
||||
const Timeline::TimelineModel *model = timelineModelByModelId(timelineModel(i));
|
||||
if (!model)
|
||||
continue;
|
||||
|
||||
int index = timelineIndex(i);
|
||||
QmlProfilerDataModel::QmlEventNoteData save = {
|
||||
QmlNote save = {
|
||||
model->typeId(index),
|
||||
model->startTime(index),
|
||||
model->duration(index),
|
||||
@@ -98,7 +97,7 @@ void QmlProfilerNotesModel::saveData()
|
||||
};
|
||||
notes.append(save);
|
||||
}
|
||||
m_modelManager->qmlModel()->setNoteData(notes);
|
||||
m_modelManager->qmlModel()->setNotes(notes);
|
||||
resetModified();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user