fix: error when load debug configuration files

This commit is contained in:
Roy Qu 2023-05-29 12:07:27 +08:00
parent 11bceaf972
commit 036a69bf3f
1 changed files with 1 additions and 1 deletions

View File

@ -814,7 +814,7 @@ PDebugConfig Debugger::load(const QString &filename, bool forProject)
return pConfig; return pConfig;
QJsonParseError error; QJsonParseError error;
QJsonDocument doc(QJsonDocument::fromJson(content,&error)); QJsonDocument doc(QJsonDocument::fromJson(content,&error));
if (error.error == QJsonParseError::NoError) { if (error.error != QJsonParseError::NoError) {
throw FileError(tr("Error in json file '%1':%2 : %3") throw FileError(tr("Error in json file '%1':%2 : %3")
.arg(filename) .arg(filename)
.arg(error.offset) .arg(error.offset)