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

Method setModified

app/src/DataModel/ProjectModel.cpp:4834–4844  ·  view source on GitHub ↗

* @brief Updates the project's modification flag and emits modifiedChanged; a * request to dirty a truly empty project intentionally leaves the flag clean for * the dirty-flag UX but still emits contentTouched so the backup layer (whose * snapshot hash decides) gets nudged. */

Source from the content-addressed store, hash-verified

4832 * snapshot hash decides) gets nudged.
4833 */
4834void DataModel::ProjectModel::setModified(const bool modified)
4835{
4836 if (modified && m_groups.empty() && m_actions.empty() && m_tables.empty() && m_workspaces.empty()
4837 && !m_customizeWorkspaces && !m_locked && m_hiddenGroupIds.isEmpty()) {
4838 Q_EMIT contentTouched();
4839 return;
4840 }
4841
4842 m_modified = modified;
4843 Q_EMIT modifiedChanged();
4844}
4845
4846/**
4847 * @brief Sets source[0].frameParserCode and emits frameParserCodeChanged.

Callers 15

generateProjectMethod · 0.80
restoreMethod · 0.80
onProjectItemChangedMethod · 0.80
readCodeMethod · 0.80
selectTemplateMethod · 0.80
reloadMethod · 0.80
readCodeMethod · 0.80
selectTemplateMethod · 0.80
reloadMethod · 0.80
readCodeMethod · 0.80
selectTemplateMethod · 0.80
readCodeMethod · 0.80

Calls 2

emptyMethod · 0.80
isEmptyMethod · 0.80

Tested by

no test coverage detected