MCPcopy Create free account
hub / github.com/baldurk/renderdoc / valueString

Function valueString

qrenderdoc/Windows/Dialogs/ConfigEditor.cpp:37–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35#include "ui_ConfigEditor.h"
36
37static QString valueString(const SDObject *o)
38{
39 if(o->type.basetype == SDBasic::String)
40 return o->data.str;
41
42 if(o->type.basetype == SDBasic::UnsignedInteger)
43 return Formatter::Format(o->data.basic.u);
44
45 if(o->type.basetype == SDBasic::SignedInteger)
46 return Formatter::Format(o->data.basic.i);
47
48 if(o->type.basetype == SDBasic::Float)
49 return Formatter::Format(o->data.basic.d);
50
51 if(o->type.basetype == SDBasic::Boolean)
52 return o->data.basic.b ? lit("True") : lit("False");
53
54 if(o->type.basetype == SDBasic::Array)
55 return lit("{...}");
56
57 return lit("??");
58}
59
60static bool anyChildChanged(const SDObject *o)
61{

Callers 1

dataMethod · 0.70

Calls 1

FormatEnum · 0.50

Tested by

no test coverage detected