[nostalgia/studio] Fix JSON errors to only display when error occurs
This commit is contained in:
parent
1269ee7fad
commit
2fb0ddf709
@ -93,8 +93,8 @@ template<typename T>
|
|||||||
ox::Error readJson(QString json, T *dest) {
|
ox::Error readJson(QString json, T *dest) {
|
||||||
QJsonParseError err;
|
QJsonParseError err;
|
||||||
auto obj = QJsonDocument::fromJson(json.toUtf8(), &err).object();
|
auto obj = QJsonDocument::fromJson(json.toUtf8(), &err).object();
|
||||||
qDebug() << "JSON parsing error:" << err.errorString();
|
|
||||||
if (err.error) {
|
if (err.error) {
|
||||||
|
qDebug() << "JSON parsing error:" << err.errorString();
|
||||||
return OxError(1);
|
return OxError(1);
|
||||||
}
|
}
|
||||||
JsonReader rdr(obj);
|
JsonReader rdr(obj);
|
||||||
|
Loading…
Reference in New Issue
Block a user