mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-09-29 14:14:15 +02:00
Merge pull request #1085 from ispyisail/fix/1080-parseoption-qt65
Fix the build on Qt older than 6.5 (#1080)
This commit is contained in:
@@ -386,7 +386,13 @@ QETProject::ProjectState QETProject::openFile(QFile *file)
|
||||
// QET::findInDomElement()), so the extra whitespace-only text nodes
|
||||
// this keeps around are inert everywhere but the two elements that
|
||||
// call .text() on themselves -- which is exactly where the bug was.
|
||||
// The option exists since Qt 6.5; older Qt always drops such nodes,
|
||||
// so there an all-whitespace value still reloads as "".
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
|
||||
if (!xml_project.setContent(content, QDomDocument::ParseOption::PreserveSpacingOnlyNodes))
|
||||
#else
|
||||
if (!xml_project.setContent(content))
|
||||
#endif
|
||||
{
|
||||
if(opened_here) {
|
||||
file->close();
|
||||
|
||||
Reference in New Issue
Block a user