forked from qt-creator/qt-creator
QmlProfiler: Rename all the timeline model data structs to Item
This allows us to define a template for filling a QmlProfilerTimelineModel without spelling out all the type names. Change-Id: I97870287a795d95f58a949729afa715f145817bb Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -81,7 +81,7 @@ QVariantMap InputEventsModel::details(int index) const
|
||||
result.insert(tr("Timestamp"), Timeline::formatTime(startTime(index),
|
||||
modelManager()->traceDuration()));
|
||||
QString type;
|
||||
const InputEvent &event = m_data[index];
|
||||
const Item &event = m_data[index];
|
||||
switch (event.type) {
|
||||
case InputKeyPress:
|
||||
type = tr("Key Press");
|
||||
@@ -150,7 +150,7 @@ int InputEventsModel::collapsedRow(int index) const
|
||||
void InputEventsModel::loadEvent(const QmlEvent &event, const QmlEventType &type)
|
||||
{
|
||||
m_data.insert(insert(event.timestamp(), 0, type.detailType()),
|
||||
InputEvent(static_cast<InputEventType>(event.number<qint32>(0)),
|
||||
Item(static_cast<InputEventType>(event.number<qint32>(0)),
|
||||
event.number<qint32>(1), event.number<qint32>(2)));
|
||||
|
||||
if (type.detailType() == Mouse) {
|
||||
@@ -175,7 +175,7 @@ void InputEventsModel::clear()
|
||||
QmlProfilerTimelineModel::clear();
|
||||
}
|
||||
|
||||
InputEventsModel::InputEvent::InputEvent(InputEventType type, int a, int b) :
|
||||
InputEventsModel::Item::Item(InputEventType type, int a, int b) :
|
||||
type(type), a(a), b(b)
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user