| 1898 | } |
| 1899 | |
| 1900 | bool CaptureContext::SaveBookmarks() |
| 1901 | { |
| 1902 | QVariantList bookmarks; |
| 1903 | for(const EventBookmark &mark : m_Bookmarks) |
| 1904 | { |
| 1905 | QVariantMap variantmark; |
| 1906 | variantmark[lit("eventId")] = mark.eventId; |
| 1907 | variantmark[lit("text")] = mark.text; |
| 1908 | |
| 1909 | bookmarks.push_back(variantmark); |
| 1910 | } |
| 1911 | |
| 1912 | QVariantMap root; |
| 1913 | root[lit("Bookmarks")] = bookmarks; |
| 1914 | |
| 1915 | QString json = VariantToJSON(root); |
| 1916 | |
| 1917 | SectionProperties props; |
| 1918 | props.type = SectionType::Bookmarks; |
| 1919 | props.version = 1; |
| 1920 | |
| 1921 | return Replay().GetCaptureFile()->WriteSection(props, json.toUtf8()).OK(); |
| 1922 | } |
| 1923 | |
| 1924 | void CaptureContext::LoadBookmarks(const QString &data) |
| 1925 | { |
nothing calls this directly
no test coverage detected