Skip to content

Commit

Permalink
[CORRECTIVE] Fix bus interface portmap isInformative element reading.…
Browse files Browse the repository at this point in the history
… Don't create element if it doesn't exist.
  • Loading branch information
hagantsa committed Aug 5, 2024
1 parent 5f51e1d commit e21cdd1
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions IPXACTmodels/Component/BusInterfaceReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit e21cdd1

Please sign in to comment.