forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user