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

Method setDemoSession

app/src/AppState.cpp:151–157  ·  view source on GitHub ↗

* @brief Marks a demo session rooted at demoDir: the last-project path and operation mode * are not persisted while a project inside that directory is loaded, so the bundled * demo can never hijack the next launch. Cleared when an outside project loads, which * also re-persists the live mode that was swallowed while the guard was up. */

Source from the content-addressed store, hash-verified

149 * also re-persists the live mode that was swallowed while the guard was up.
150 */
151void AppState::setDemoSession(const QString& demoDir)
152{
153 if (demoDir.isEmpty())
154 m_demoSessionDir.clear();
155 else
156 m_demoSessionDir = QDir::cleanPath(demoDir) + QStringLiteral("/");
157}
158
159/**
160 * @brief Sets the operation mode, persists it, and emits derived config changes.

Callers 1

startDemoMethod · 0.80

Calls 2

isEmptyMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected