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

Function RichResourceTextFormat

qrenderdoc/Code/QRDUtils.cpp:1233–1254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1231}
1232
1233QString RichResourceTextFormat(ICaptureContext &ctx, QVariant var)
1234{
1235 RichResourceTextInitialise(var, &ctx);
1236 if(var.userType() == qMetaTypeId<ResourceId>())
1237 return GetTruncatedResourceName(ctx, var.value<ResourceId>());
1238
1239 if(var.userType() == qMetaTypeId<GPUAddressPtr>())
1240 {
1241 var.value<GPUAddressPtr>()->cacheAddress(ctx);
1242
1243 // a bit hacky, but recurse to pick up the 'name' of the pointer base buffer
1244 return RichResourceTextFormat(ctx, var.toString());
1245 }
1246
1247 if(var.userType() == qMetaTypeId<RichResourceTextPtr>())
1248 var.value<RichResourceTextPtr>()->cacheText(ctx);
1249
1250 // either it's something else and wasn't rich resource, in which case just return the string
1251 // representation, or it's a fully formatted rich resource document, where the cached text will do
1252 // the trick with ResIdTextToString.
1253 return var.toString();
1254}
1255
1256FullEditorDelegate::FullEditorDelegate(QWidget *parent) : QStyledItemDelegate(parent)
1257{

Callers 6

sortMethod · 0.85
copySelectionMethod · 0.85
updateVariableTooltipMethod · 0.85
GetEventNameMethod · 0.85
filterFunction_paramMethod · 0.85
GetExportStringMethod · 0.85

Calls 5

GetTruncatedResourceNameFunction · 0.85
cacheAddressMethod · 0.80
cacheTextMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected