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

Method SaveRenames

qrenderdoc/Code/CaptureContext.cpp:1852–1870  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1850}
1851
1852bool CaptureContext::SaveRenames()
1853{
1854 QVariantMap resources;
1855 for(ResourceId id : m_CustomNames.keys())
1856 {
1857 resources[ToQStr(id)] = m_CustomNames[id];
1858 }
1859
1860 QVariantMap root;
1861 root[lit("CustomResourceNames")] = resources;
1862
1863 QString json = VariantToJSON(root);
1864
1865 SectionProperties props;
1866 props.type = SectionType::ResourceRenames;
1867 props.version = 1;
1868
1869 return Replay().GetCaptureFile()->WriteSection(props, json.toUtf8()).OK();
1870}
1871
1872void CaptureContext::LoadRenames(const QString &data)
1873{

Callers

nothing calls this directly

Calls 6

VariantToJSONFunction · 0.85
GetCaptureFileMethod · 0.80
toUtf8Method · 0.80
ToQStrFunction · 0.70
keysMethod · 0.45
WriteSectionMethod · 0.45

Tested by

no test coverage detected