X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=gui%2Fapitracecall.h;h=46e44b2e81eb1860dcb93dcff9dd2fc45993ca03;hb=ed40bc699e44f810d27c7e50d396f7749c8cc9c2;hp=89f310205545f23e62f5713a958104e168efae0a;hpb=36a0fd36456a7ae909cc04e20781b489c4ddc37b;p=apitrace diff --git a/gui/apitracecall.h b/gui/apitracecall.h index 89f3102..46e44b2 100644 --- a/gui/apitracecall.h +++ b/gui/apitracecall.h @@ -179,27 +179,33 @@ class ApiTraceEvent { public: enum Type { - None, - Call, - Frame + None = 0, + Call = 1 << 0, + Frame = 1 << 1 }; public: ApiTraceEvent(); ApiTraceEvent(Type t); virtual ~ApiTraceEvent(); - Type type() const { return m_type; } + Type type() const { return (Type)m_type; } virtual QStaticText staticText() const = 0; virtual int numChildren() const = 0; QVariantMap stateParameters() const; - ApiTraceState state() const; - void setState(const ApiTraceState &state); + ApiTraceState *state() const; + void setState(ApiTraceState *state); + bool hasState() const + { + return m_state && !m_state->isEmpty(); + } protected: - Type m_type; - ApiTraceState m_state; + int m_type : 4; + mutable bool m_hasBinaryData; + mutable int m_binaryDataIndex:8; + ApiTraceState *m_state; mutable QStaticText *m_staticText; }; @@ -253,8 +259,6 @@ private: mutable QString m_richText; mutable QString m_searchText; - mutable bool m_hasBinaryData; - mutable int m_binaryDataIndex; }; Q_DECLARE_METATYPE(ApiTraceCall*);