* @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. */
| 149 | * also re-persists the live mode that was swallowed while the guard was up. |
| 150 | */ |
| 151 | void 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. |