Move parts of QmlEvent and QmlEventType to timeline

Timeline will become a generic trace handling library. It needs some
abstract concept of events and event types.

Move operator== and operator!= for QmlEvent into the test as we don't
use them anywhere else.

Move the operators for QmlEventType to QmlProfilerTraceClient. We want
to get rid of the hash there as soon as we can assume that no
application we want to profile doesn't support server type IDs.

Change-Id: Icde4e3e7634e387171dc1d8bef7bbe8e71684a1a
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Ulf Hermann
2018-03-27 17:39:17 +02:00
parent 5c8c208f26
commit 507c2d6b5b
13 changed files with 216 additions and 94 deletions

View File

@@ -377,8 +377,10 @@ bool QmlProfilerModelManager::replayEvents(qint64 rangeStart, qint64 rangeEnd,
void QmlProfilerModelManager::QmlProfilerModelManagerPrivate::dispatch(const QmlEvent &event,
const QmlEventType &type)
{
for (const EventLoader &loader : eventLoaders.value(type.feature()))
for (const EventLoader &loader : eventLoaders.value(
static_cast<ProfileFeature>(type.feature()))) {
loader(event, type);
}
++numLoadedEvents;
}