diff options
author | José Fonseca <jfonseca@vmware.com> | 2014-12-19 16:22:39 +0000 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2014-12-19 16:22:39 +0000 |
commit | 446ca50d78d519230060d60c7179347ffb23de0c (patch) | |
tree | ce77aa91b9ef934e786ba5c9ba097b887122b395 /gui/apitracecall.h | |
parent | 8374a0d66ca9228269e860089c1535fcda9f9c5f (diff) |
gui: Remove ApiTraceEnumSignature.
It was leaking all over the place, because it wasn't always attached to a
TraceLoader.
I tried to plumb TraceLoader pointer through to where it was needed, but I
failed, as some of the callers where nowhere near to get hold of it.
I also believe that instead of converting every trace_model.hpp
object into a QVariant is it preferable for the GUI to hold on to the
trace_model.hpp objects themselves, and only produce Qt objects for the
derived state it needs for fast render/search.
Diffstat (limited to 'gui/apitracecall.h')
-rw-r--r-- | gui/apitracecall.h | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/gui/apitracecall.h b/gui/apitracecall.h index 1534107c..3a7655fa 100644 --- a/gui/apitracecall.h +++ b/gui/apitracecall.h @@ -17,9 +17,6 @@ class TraceLoader; class VariantVisitor : public trace::Visitor { public: - VariantVisitor(TraceLoader *loader) - : m_loader(loader) - {} virtual void visit(trace::Null *); virtual void visit(trace::Bool *node); virtual void visit(trace::SInt *node); @@ -41,7 +38,6 @@ public: return m_variant; } private: - TraceLoader *m_loader; QVariant m_variant; }; @@ -53,29 +49,16 @@ struct ApiTraceError QString message; }; -class ApiTraceEnumSignature -{ -public: - ApiTraceEnumSignature(const trace::EnumSig *sig); - - QString name(signed long long value) const; - -private: - typedef QList<QPair<QString, signed long long> > ValueList; - ValueList m_names; -}; - class ApiEnum { public: - ApiEnum(ApiTraceEnumSignature *sig=0, signed long long value = 0); + ApiEnum(const trace::EnumSig *sig=0, signed long long value = 0); QString toString() const; QVariant value() const; - QString name() const; private: - ApiTraceEnumSignature *m_sig; + const trace::EnumSig *m_sig; signed long long m_value; }; Q_DECLARE_METATYPE(ApiEnum); |