aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmlprofiler/inputeventsmodel.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2016-04-28 15:57:12 +0200
committerUlf Hermann <ulf.hermann@qt.io>2016-05-09 08:20:22 +0000
commit8d15633a22d5fb72db3342626e001bfbcf0e0d7b (patch)
treec63c6d7e735f5f1acce5df2e2780f560c71ff6b7 /src/plugins/qmlprofiler/inputeventsmodel.cpp
parent61d94c5ccd12f676079a0d4c1fa7c4c0c73fc609 (diff)
QmlProfiler: Add a QmlTypedEvent and extend QmlEvent
The QmlTypedEvent is mainly useful to read a generic QmlEvent and QmlEventType from a QPacket. QmlEventType has a stream operator to do exactly that. QmlEvent also gets further options to store 32-bit data in addition to 64- and 8-bit data. Also, with the more generic storage layout we can reduce the memory consumption of range events by 50%. This comes at the cost of additional memory allocations for non-range events, but as non-range events are significantly less frequent than range events, this is a good tradeoff. Finally the new storage layout lends itself to efficient serialization, which will help when developing new storage and transfer formats for QML traces. Change-Id: I420de68b0142f23c8fb2ca8b329d7ffe69c83fe0 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src/plugins/qmlprofiler/inputeventsmodel.cpp')
-rw-r--r--src/plugins/qmlprofiler/inputeventsmodel.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/qmlprofiler/inputeventsmodel.cpp b/src/plugins/qmlprofiler/inputeventsmodel.cpp
index e7438282169..455f78b6a86 100644
--- a/src/plugins/qmlprofiler/inputeventsmodel.cpp
+++ b/src/plugins/qmlprofiler/inputeventsmodel.cpp
@@ -153,8 +153,8 @@ void InputEventsModel::loadData()
continue;
m_data.insert(insert(event.timestamp(), 0, type.detailType),
- InputEvent(static_cast<InputEventType>(event.numericData(0)),
- event.numericData(1), event.numericData(2)));
+ InputEvent(static_cast<InputEventType>(event.number<qint32>(0)),
+ event.number<qint32>(1), event.number<qint32>(2)));
if (type.detailType == Mouse) {
if (m_mouseTypeId == -1)