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

Method LoadRenames

qrenderdoc/Code/CaptureContext.cpp:1872–1898  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1870}
1871
1872void CaptureContext::LoadRenames(const QString &data)
1873{
1874 QVariantMap root = JSONToVariant(data);
1875
1876 if(root.contains(lit("CustomResourceNames")))
1877 {
1878 QVariantMap resources = root[lit("CustomResourceNames")].toMap();
1879
1880 for(const QString &str : resources.keys())
1881 {
1882 ResourceId id;
1883
1884 if(str.startsWith(lit("ResourceId::")))
1885 {
1886 qulonglong num = str.mid(sizeof("ResourceId::") - 1).toULongLong();
1887 memcpy(&id, &num, sizeof(num));
1888 }
1889 else
1890 {
1891 qCritical() << "Unrecognised resourceid encoding" << str;
1892 }
1893
1894 if(id != ResourceId())
1895 m_CustomNames[id] = resources[str].toString();
1896 }
1897 }
1898}
1899
1900bool CaptureContext::SaveBookmarks()
1901{

Callers

nothing calls this directly

Calls 8

JSONToVariantFunction · 0.85
memcpyFunction · 0.50
ResourceIdFunction · 0.50
containsMethod · 0.45
keysMethod · 0.45
startsWithMethod · 0.45
midMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected