mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
check config when writing (#405)
* check config when writing * integrate #403
This commit is contained in:
@@ -1028,7 +1028,7 @@ void JsonClientConnection::handleSchemaGetCommand(const QJsonObject& message, co
|
||||
|
||||
// read the hyperion json schema from the resource
|
||||
QFile schemaData(":/hyperion-schema-"+QString::number(_hyperion->getConfigVersionId()));
|
||||
|
||||
|
||||
if (!schemaData.open(QIODevice::ReadOnly))
|
||||
{
|
||||
std::stringstream error;
|
||||
@@ -1039,7 +1039,7 @@ void JsonClientConnection::handleSchemaGetCommand(const QJsonObject& message, co
|
||||
QByteArray schema = schemaData.readAll();
|
||||
QJsonDocument doc = QJsonDocument::fromJson(schema, &error);
|
||||
schemaData.close();
|
||||
|
||||
|
||||
if (error.error != QJsonParseError::NoError)
|
||||
{
|
||||
// report to the user the failure and their locations in the document.
|
||||
|
Reference in New Issue
Block a user