Gui: For Qt 6.5 and later, use ParseOptions in xml

This commit is contained in:
Chris Hennes
2025-08-09 10:50:25 -05:00
committed by Chris Hennes
parent d1c8362076
commit fc72817079
2 changed files with 16 additions and 0 deletions

View File

@@ -469,6 +469,11 @@ DocumentRecoveryPrivate::XmlConfig DocumentRecoveryPrivate::readXmlFile(const QS
if (!file.open(QFile::ReadOnly))
return cfg;
#if QT_VERSION >= QT_VERSION_CHECK(6,5,0)
if (!domDocument.setContent(&file, QDomDocument::ParseOption::UseNamespaceProcessing)) {
return cfg;
}
#else
QString errorStr;
int errorLine;
int errorColumn;
@@ -477,6 +482,7 @@ DocumentRecoveryPrivate::XmlConfig DocumentRecoveryPrivate::readXmlFile(const QS
&errorColumn)) {
return cfg;
}
#endif
QDomElement root = domDocument.documentElement();
if (root.tagName() != QLatin1String("AutoRecovery")) {