QmlProfiler: Add extra metadata to notes

This way we can improve the heuristic used for mapping notes to
timeline events, by taking the row into account. Also, by marking
notes as loaded when loading them we avoid accidentally dropping
them by restricting to ranges.

Change-Id: I031389880571805788c910728ee89333a5cd4727
Task-number: QTCREATORBUG-16542
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Ulf Hermann
2016-07-06 11:34:15 +02:00
parent 5df7b1272d
commit d12c8806ac
8 changed files with 61 additions and 23 deletions

View File

@@ -30,18 +30,21 @@ namespace QmlProfiler {
QDataStream &operator>>(QDataStream &stream, QmlNote &note)
{
return stream >> note.m_typeIndex >> note.m_startTime >> note.m_duration >> note.m_text;
return stream >> note.m_typeIndex >> note.m_collapsedRow >> note.m_startTime >> note.m_duration
>> note.m_text;
}
QDataStream &operator<<(QDataStream &stream, const QmlNote &note)
{
return stream << note.m_typeIndex << note.m_startTime << note.m_duration << note.m_text;
return stream << note.m_typeIndex << note.m_collapsedRow << note.m_startTime << note.m_duration
<< note.m_text;
}
bool operator==(const QmlNote &note1, const QmlNote &note2)
{
return note1.typeIndex() == note2.typeIndex() && note1.startTime() == note2.startTime()
&& note1.duration() == note2.duration() && note1.text() == note2.text();
return note1.typeIndex() == note2.typeIndex() && note1.collapsedRow() == note2.collapsedRow()
&& note1.startTime() == note2.startTime() && note1.duration() == note2.duration()
&& note1.text() == note2.text();
}
bool operator!=(const QmlNote &note1, const QmlNote &note2)