diff options
Diffstat (limited to 'src/libs/tracing/traceevent.h')
-rw-r--r-- | src/libs/tracing/traceevent.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/libs/tracing/traceevent.h b/src/libs/tracing/traceevent.h index 780ebf7ad91..7f097315eb1 100644 --- a/src/libs/tracing/traceevent.h +++ b/src/libs/tracing/traceevent.h @@ -26,13 +26,14 @@ #pragma once #include "tracing_global.h" +#include "safecastable.h" #include <QHash> #include <QMetaType> namespace Timeline { -class TraceEvent +class TraceEvent : public SafeCastable<TraceEvent> { public: qint64 timestamp() const { return m_timestamp; } @@ -43,9 +44,11 @@ public: bool isValid() const { return m_typeIndex != -1; } + qint32 classId() const { return m_classId; } + protected: - TraceEvent(qint64 timestamp = -1, qint32 typeIndex = -1) - : m_timestamp(timestamp), m_typeIndex(typeIndex) + TraceEvent(qint32 classId, qint64 timestamp = -1, qint32 typeIndex = -1) + : m_timestamp(timestamp), m_typeIndex(typeIndex), m_classId(classId) {} TraceEvent(const TraceEvent &) = default; @@ -56,6 +59,7 @@ protected: private: qint64 m_timestamp; qint32 m_typeIndex; + qint32 m_classId; }; } // namespace Timeline |