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

Method storeProjectMetadata

app/src/Sessions/DatabaseManager.cpp:1051–1066  ·  view source on GitHub ↗

* @brief Stores the current project JSON in the project_metadata table. */

Source from the content-addressed store, hash-verified

1049 * @brief Stores the current project JSON in the project_metadata table.
1050 */
1051void Sessions::DatabaseManager::storeProjectMetadata()
1052{
1053 if (!isOpen())
1054 return;
1055
1056 const auto& pm = DataModel::ProjectModel::instance();
1057 const auto json = QJsonDocument(pm.serializeToJson()).toJson(QJsonDocument::Compact);
1058
1059 setBusy(true);
1060 QMetaObject::invokeMethod(m_worker,
1061 "storeProjectMetadata",
1062 Qt::QueuedConnection,
1063 Q_ARG(QString, QString::fromUtf8(json)),
1064 Q_ARG(QString, pm.title()),
1065 Q_ARG(quint64, nextToken()));
1066}
1067
1068/**
1069 * @brief Dispatches the JSON fetch to the worker; reply continues in

Callers

nothing calls this directly

Calls 3

serializeToJsonMethod · 0.80
titleMethod · 0.80
toJsonMethod · 0.45

Tested by

no test coverage detected