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

Method sessionMetadata

app/src/Sessions/DatabaseManager.cpp:388–406  ·  view source on GitHub ↗

* @brief Returns full metadata for a session from the cached list. */

Source from the content-addressed store, hash-verified

386 * @brief Returns full metadata for a session from the cached list.
387 */
388QVariantMap Sessions::DatabaseManager::sessionMetadata(int sessionId) const
389{
390 QVariantMap result;
391 for (const auto& v : m_sessionList) {
392 const auto m = v.toMap();
393 if (m.value("session_id").toInt() != sessionId)
394 continue;
395
396 result["session_id"] = sessionId;
397 result["project_title"] = m.value("project_title");
398 result["started_at"] = m.value("started_at");
399 result["ended_at"] = m.value("ended_at");
400 result["notes"] = m.value("notes");
401 result["frame_count"] = m.value("frame_count");
402 return result;
403 }
404
405 return result;
406}
407
408/**
409 * @brief Returns the canonical .db path for a project title. Pure path arithmetic.

Callers 1

getMethod · 0.80

Calls 1

valueMethod · 0.45

Tested by

no test coverage detected