diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2016-04-26 11:50:59 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2016-05-04 09:49:32 +0000 |
commit | a9555371327b31a294109b42d954371105ccee9b (patch) | |
tree | f1778f3db29710d74841419e94991741fca56d60 /src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp | |
parent | 08f807a13465b8664cafaa4206076d9d083a6e9a (diff) |
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>
Diffstat (limited to 'src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp')
-rw-r--r-- | src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp b/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp index f93e0482600..35bfd566905 100644 --- a/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp @@ -71,10 +71,10 @@ void QmlProfilerRangeModel::loadData() return; // collect events - const QVector<QmlProfilerDataModel::QmlEventData> &eventList = simpleModel->getEvents(); - const QVector<QmlProfilerDataModel::QmlEventTypeData> &typesList = simpleModel->getEventTypes(); - foreach (const QmlProfilerDataModel::QmlEventData &event, eventList) { - const QmlProfilerDataModel::QmlEventTypeData &type = typesList[event.typeIndex()]; + const QVector<QmlEvent> &eventList = simpleModel->events(); + const QVector<QmlEventType> &typesList = simpleModel->eventTypes(); + foreach (const QmlEvent &event, eventList) { + const QmlEventType &type = typesList[event.typeIndex()]; if (!accepted(type)) continue; @@ -204,8 +204,7 @@ QVariantList QmlProfilerRangeModel::labels() const { QVariantList result; - const QVector<QmlProfilerDataModel::QmlEventTypeData> &types = - modelManager()->qmlModel()->getEventTypes(); + const QVector<QmlEventType> &types = modelManager()->qmlModel()->eventTypes(); for (int i = 1; i < expandedRowCount(); i++) { // Ignore the -1 for the first row QVariantMap element; int typeId = m_expandedRowTypes[i]; @@ -222,8 +221,7 @@ QVariantMap QmlProfilerRangeModel::details(int index) const { QVariantMap result; int id = selectionId(index); - const QVector<QmlProfilerDataModel::QmlEventTypeData> &types = - modelManager()->qmlModel()->getEventTypes(); + const QVector<QmlEventType> &types = modelManager()->qmlModel()->eventTypes(); result.insert(QStringLiteral("displayName"), tr(QmlProfilerModelManager::featureName(mainFeature()))); @@ -247,11 +245,10 @@ int QmlProfilerRangeModel::typeId(int index) const int QmlProfilerRangeModel::selectionIdForLocation(const QString &filename, int line, int column) const { // if this is called from v8 view, we don't have the column number, it will be -1 - const QVector<QmlProfilerDataModel::QmlEventTypeData> &types = - modelManager()->qmlModel()->getEventTypes(); + const QVector<QmlEventType> &types = modelManager()->qmlModel()->eventTypes(); for (int i = 1; i < expandedRowCount(); ++i) { int typeId = m_expandedRowTypes[i]; - const QmlProfilerDataModel::QmlEventTypeData &eventData = types[typeId]; + const QmlEventType &eventData = types[typeId]; if (eventData.location.filename == filename && eventData.location.line == line && (column == -1 || eventData.location.column == column)) |