From 37bcbf75751cf562bc431ae01f85c56193b85a04 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 7 May 2018 10:50:58 +0200 Subject: Tracing: Make sure we don't cast between different kinds of events Add a classId to TraceEvent and TraceEventType and add is() and as() methods that check for it. Change-Id: I76fe1df624516b36db90d57d4788b17e0b690726 Reviewed-by: Tobias Hunger --- src/plugins/qmlprofiler/qmleventtype.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/plugins/qmlprofiler/qmleventtype.h') diff --git a/src/plugins/qmlprofiler/qmleventtype.h b/src/plugins/qmlprofiler/qmleventtype.h index 6c3fc53e06..1e038e634e 100644 --- a/src/plugins/qmlprofiler/qmleventtype.h +++ b/src/plugins/qmlprofiler/qmleventtype.h @@ -37,6 +37,8 @@ namespace QmlProfiler { class QmlEventType : public Timeline::TraceEventType { public: + static const qint32 staticClassId = 0x716d6c74; // 'qmlt'; + QmlEventType(Message message = MaximumMessage, RangeType rangeType = MaximumRangeType, int detailType = -1, const QmlEventLocation &location = QmlEventLocation(), const QString &data = QString(), const QString displayName = QString()); -- cgit v1.2.3