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

Method clearAllWorkspaces

app/src/DataModel/ProjectModel.cpp:5106–5121  ·  view source on GitHub ↗

* @brief Wipes every workspace, leaving an empty customised list. */

Source from the content-addressed store, hash-verified

5104 * @brief Wipes every workspace, leaving an empty customised list.
5105 */
5106void DataModel::ProjectModel::clearAllWorkspaces()
5107{
5108 if (AppState::instance().operationMode() != SerialStudio::ProjectFile)
5109 return;
5110
5111 if (!m_customizeWorkspaces)
5112 setCustomizeWorkspaces(true);
5113
5114 if (m_workspaces.empty())
5115 return;
5116
5117 m_workspaces.clear();
5118 setModified(true);
5119 Q_EMIT editorWorkspacesChanged();
5120 Q_EMIT activeWorkspacesChanged();
5121}
5122
5123/**
5124 * @brief Renames the workspace with the given ID.

Callers 1

clearAllMethod · 0.80

Calls 3

operationModeMethod · 0.80
emptyMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected