MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / updateSourceFrameParser

Method updateSourceFrameParser

app/src/DataModel/ProjectModel.cpp:1691–1701  ·  view source on GitHub ↗

* @brief Updates the per-source JavaScript frame parser code. */

Source from the content-addressed store, hash-verified

1689 * @brief Updates the per-source JavaScript frame parser code.
1690 */
1691void DataModel::ProjectModel::updateSourceFrameParser(int sourceId, const QString& code)
1692{
1693 if (sourceId < 0 || sourceId >= static_cast<int>(m_sources.size()))
1694 return;
1695
1696 m_sources[sourceId].frameParserCode = code;
1697 DataModel::FrameParser::instance().setSourceCode(sourceId, code);
1698 setModified(true);
1699
1700 Q_EMIT sourceFrameParserCodeChanged(sourceId);
1701}
1702
1703/**
1704 * @brief Snapshots the current driver settings for source @p sourceId into

Callers 3

parserSetCodeMethod · 0.80
setTemplateIdxMethod · 0.80

Calls 2

setSourceCodeMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected