fix Warning
This commit is contained in:
1 parent
593c221d23
commit
8345470273
316 files changed
+1246
-929
No files matched your search
+3
-5
@@ -32,13 +32,11 @@ QDomElement readFile(const QString &fn, const QString &rootTag)
|
||||
return QDomElement();
|
||||
}
|
||||
|
||||
QString errMsg;
|
||||
int errLine = 0;
|
||||
int errColumn = 0;
|
||||
QDomDocument doc;
|
||||
if (!doc.setContent(data, &errMsg, &errLine, &errColumn))
|
||||
const auto parseResult = doc.setContent(data);
|
||||
if (!parseResult)
|
||||
{
|
||||
WARNING_LOG(logger()) << "Could not parse xml file '" << fn << "' at " << errLine << ":" << errColumn << ": " << errMsg;
|
||||
WARNING_LOG(logger()) << "Could not parse xml file '" << fn << "' at " << int(parseResult.errorLine) << ":" << int(parseResult.errorColumn) << ": " << parseResult.errorMessage;
|
||||
return QDomElement();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user