Fix backward compatibility issue with QmlProfiler

Previous implementation uses MaxMessage and MaxRangeType constants to
specify events with undefined message or range type. This causes
backwards compatibility issue if new message or range types are
added, because those constants are also written to files when saving
profiler traces.

Add UndefinedMessage and UndefinedRangeType constants and use those
instead of the MaxMessage and MaxRangeType constants. This doesn't fix
opening old traces, but the same problem won't happend again with new
traces.

Also update profiler autotests with fixed data.

Task-number: QTCREATORBUG-28146
Change-Id: Ief003d39f871dd1ff2cc908e6a4d4b4678fd0868
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Antti Määttä
2022-09-19 15:34:52 +03:00
parent e8ebd8e497
commit 0f49728c32
24 changed files with 60 additions and 58 deletions

View File

@@ -38,7 +38,7 @@ namespace Internal {
InputEventsModel::InputEventsModel(QmlProfilerModelManager *manager,
Timeline::TimelineModelAggregator *parent) :
QmlProfilerTimelineModel(manager, Event, MaximumRangeType, ProfileInputEvents, parent),
QmlProfilerTimelineModel(manager, Event, UndefinedRangeType, ProfileInputEvents, parent),
m_keyTypeId(-1), m_mouseTypeId(-1)
{
}