From e21cdd17d4ea840240d773c69e3d3a8c04dbe3e6 Mon Sep 17 00:00:00 2001 From: hagantsa Date: Mon, 5 Aug 2024 15:39:33 +0300 Subject: [PATCH] [CORRECTIVE] Fix bus interface portmap isInformative element reading. Don't create element if it doesn't exist. --- IPXACTmodels/Component/BusInterfaceReader.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/IPXACTmodels/Component/BusInterfaceReader.cpp b/IPXACTmodels/Component/BusInterfaceReader.cpp index f50ee3cca..c7ffa0409 100644 --- a/IPXACTmodels/Component/BusInterfaceReader.cpp +++ b/IPXACTmodels/Component/BusInterfaceReader.cpp @@ -230,10 +230,15 @@ void BusinterfaceReader::Details::parsePortMaps(QDomElement const& portMapsEleme portMap->setLogicalTieOff(logicalTieOffElement.firstChild().nodeValue()); - - QDomElement isInformativeElement = portMapElement.firstChildElement(QStringLiteral("ipxact:isInformative")); - - portMap->setIsInformative(isInformativeElement.firstChild().nodeValue() == QLatin1String("true")); + if (QDomElement isInformativeElement = portMapElement.firstChildElement(QStringLiteral("ipxact:isInformative")); + isInformativeElement.firstChild().nodeValue().isEmpty()) + { + portMap->clearIsInformative(); // Set unspecified value if value doesn't exist. + } + else + { + portMap->setIsInformative(isInformativeElement.firstChild().nodeValue() == QLatin1String("true")); + } if (docRevision == Document::Revision::Std22) {