mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-25 03:12:56 +00:00
print warning on parser error from json_settings_read() function
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
parent
9d272713fb
commit
f54e0ee862
1 changed files with 3 additions and 1 deletions
|
@ -78,8 +78,10 @@ static bool json_settings_read(QIODevice &device, QSettings::SettingsMap &map)
|
|||
return false;
|
||||
}
|
||||
|
||||
QJsonDocument jsondoc = QJsonDocument::fromJson(data);
|
||||
QJsonParseError error;
|
||||
QJsonDocument jsondoc = QJsonDocument::fromJson(data, &error);
|
||||
if (Q_UNLIKELY(jsondoc.isNull())) {
|
||||
qWarning("json_settings_read: %s", error.errorString().toUtf8().constData());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue