Check if XML reader stopped because of an error. (#3034)

This commit is contained in:
Mathias Schmid 2021-01-10 12:10:30 +01:00 committed by GitHub
parent b74aa707d1
commit cdc0ba32e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -279,8 +279,12 @@ QString CppcheckLibraryData::open(QIODevice &file)
break;
}
}
if (xmlReader.hasError()) {
return xmlReader.errorString();
}
else {
return QString();
}
}
static void writeContainerFunctions(QXmlStreamWriter &xmlWriter, const QString &name, int extra, const QList<struct CppcheckLibraryData::Container::Function> &functions)