* @brief Stores the current project JSON in the project_metadata table. */
| 1049 | * @brief Stores the current project JSON in the project_metadata table. |
| 1050 | */ |
| 1051 | void 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 |
nothing calls this directly
no test coverage detected