QDomDocument::ParseResult introduced in Qt 6.5

QDomDocument::setContent now requires explicit bool conversion.
https://doc.qt.io/qt-6/qdomdocument.html#setContent
This commit is contained in:
Alejandro Martinez
2024-01-17 09:56:16 -03:00
parent c553de5216
commit eb2ba14c68
3 changed files with 3 additions and 3 deletions

View File

@@ -381,7 +381,7 @@ static QString extractComponents(QString document)
// parse the document and extract the multistatus node (there is only one of those)
QDomDocument doc;
if (document == "" || doc.setContent(document) == false) return "";
if (document == "" || bool(doc.setContent(document)) == false) return "";
QDomNode multistatus = doc.documentElement();
if (multistatus.isNull()) return "";

View File

@@ -38,7 +38,7 @@ GcFileReader::openRideFile(QFile &file, QStringList &errors, QList<RideFile*>*)
return NULL;
}
bool parsed = doc.setContent(&file);
bool parsed = bool(doc.setContent(&file));
file.close();
if (!parsed) {
errors << "Could not parse file.";

View File

@@ -37,7 +37,7 @@ PwxFileReader::openRideFile(QFile &file, QStringList &errors, QList<RideFile*>*)
return NULL;
}
bool parsed = doc.setContent(&file);
bool parsed = bool(doc.setContent(&file));
file.close();
if (!parsed) {
errors << "Could not parse file.";