QmlProfiler: Add tests for QmlNote

Change-Id: Ida4a3ad0adf59d9c21d6405ea6dcbfea5d41ba71
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2016-06-07 14:15:17 +02:00
parent f9dcf28921
commit b326060da8
7 changed files with 146 additions and 4 deletions

View File

@@ -38,4 +38,15 @@ QDataStream &operator<<(QDataStream &stream, const QmlNote &note)
return stream << note.m_typeIndex << 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();
}
bool operator!=(const QmlNote &note1, const QmlNote &note2)
{
return !(note1 == note2);
}
} // namespace QmlProfiler