* @brief Closes the current session file if one is open. */
| 318 | * @brief Closes the current session file if one is open. |
| 319 | */ |
| 320 | API::CommandResponse API::Handlers::SessionsHandler::close(const QString& id, |
| 321 | const QJsonObject& params) |
| 322 | { |
| 323 | Q_UNUSED(params) |
| 324 | |
| 325 | Sessions::Export::instance().closeFile(); |
| 326 | |
| 327 | QJsonObject result; |
| 328 | result[QStringLiteral("closed")] = true; |
| 329 | result[QStringLiteral("isOpen")] = Sessions::Export::instance().isOpen(); |
| 330 | return CommandResponse::makeSuccess(id, result); |
| 331 | } |
| 332 | |
| 333 | /** |
| 334 | * @brief Returns the canonical .db path used by the session recorder for a given project title. |
no test coverage detected