| 1850 | } |
| 1851 | |
| 1852 | bool 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 | |
| 1872 | void CaptureContext::LoadRenames(const QString &data) |
| 1873 | { |
nothing calls this directly
no test coverage detected