~thalexander/unity/update-fsf-address

« back to all changes in this revision

Viewing changes to dash/previews/Track.cpp

Introspectable: use IntrospectionData class for collecting data from children

Now each introspectable object is called with an IntrospectionData parameter and calling one
of its methods it's the only way to fill introspection data into unity.
As bonus point, remove all the unneeded UnityCore/Variant.cpp inclusions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
#include <unity-shared/IconTexture.h>
30
30
#include <unity-shared/DashStyle.h>
31
31
#include <unity-shared/PreviewStyle.h>
32
 
#include <UnityCore/Variant.h>
33
32
 
34
33
namespace unity
35
34
{
138
137
  return "Track";
139
138
}
140
139
 
141
 
void Track::AddProperties(GVariantBuilder* builder)
 
140
void Track::AddProperties(debug::IntrospectionData& introspection)
142
141
{
143
 
  variant::BuilderWrapper(builder)
 
142
  introspection
144
143
    .add("uri", uri_)
145
144
    .add("play-state", (int)play_state_)
146
145
    .add("progress", progress_)