| 1944 | } |
| 1945 | |
| 1946 | bool CaptureContext::SaveNotes() |
| 1947 | { |
| 1948 | // make sure this format matches SetCaptureFileComments in app_api.cpp if it changes |
| 1949 | QVariantMap root; |
| 1950 | for(const QString &key : m_Notes.keys()) |
| 1951 | root[key] = m_Notes[key]; |
| 1952 | |
| 1953 | QString json = VariantToJSON(root); |
| 1954 | |
| 1955 | SectionProperties props; |
| 1956 | props.type = SectionType::Notes; |
| 1957 | props.version = 1; |
| 1958 | |
| 1959 | ANALYTIC_SET(UIFeatures.CaptureComments, true); |
| 1960 | |
| 1961 | return Replay().GetCaptureFile()->WriteSection(props, json.toUtf8()).OK(); |
| 1962 | } |
| 1963 | |
| 1964 | void CaptureContext::LoadNotes(const QString &data) |
| 1965 | { |
nothing calls this directly
no test coverage detected