diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2016-06-06 19:51:55 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2016-06-10 12:43:05 +0000 |
commit | e10bc709bcde23a730ba390ceae33e84cc885266 (patch) | |
tree | ca6006c9c1d833d38aa1fab61354527205c82ac8 /src/plugins/qmlprofiler/inputeventsmodel.cpp | |
parent | 5718f12af5ad983924a19a6033026b16df89fd2b (diff) |
QmlProfiler: Provide a sane ctor for QmlEventType and use it
... in turn, make its members private, so that we don't accidentally
change them.
Change-Id: Ibc65b406ee341d33f69647ed1b19e1e34f5cd535
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Diffstat (limited to 'src/plugins/qmlprofiler/inputeventsmodel.cpp')
-rw-r--r-- | src/plugins/qmlprofiler/inputeventsmodel.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/qmlprofiler/inputeventsmodel.cpp b/src/plugins/qmlprofiler/inputeventsmodel.cpp index 17114a1a967..a7827ee3aad 100644 --- a/src/plugins/qmlprofiler/inputeventsmodel.cpp +++ b/src/plugins/qmlprofiler/inputeventsmodel.cpp @@ -142,11 +142,11 @@ int InputEventsModel::collapsedRow(int index) const void InputEventsModel::loadEvent(const QmlEvent &event, const QmlEventType &type) { - m_data.insert(insert(event.timestamp(), 0, type.detailType), + m_data.insert(insert(event.timestamp(), 0, type.detailType()), InputEvent(static_cast<InputEventType>(event.number<qint32>(0)), event.number<qint32>(1), event.number<qint32>(2))); - if (type.detailType == Mouse) { + if (type.detailType() == Mouse) { if (m_mouseTypeId == -1) m_mouseTypeId = event.typeIndex(); } else if (m_keyTypeId == -1) { @@ -170,7 +170,7 @@ void InputEventsModel::clear() bool InputEventsModel::accepted(const QmlEventType &type) const { return QmlProfilerTimelineModel::accepted(type) && - (type.detailType == Mouse || type.detailType == Key); + (type.detailType() == Mouse || type.detailType() == Key); } InputEventsModel::InputEvent::InputEvent(InputEventType type, int a, int b) : |