Keep in a .qetz what QElectroTech cannot compute for a symbol it cannot build

The .qetz leaves out of its folios what QElectroTech computes when it
builds them (format 4): a symbol's terminal list and information texts,
a wire's description of its ends. A symbol whose definition the project
does not hold is never built, so none of it came back: through a .qetz,
the symbols and wires kept by the previous commit lost their terminal
lists, texts and end labels. QetContainer::dropComputed() now leaves a
symbol whose definition is not in the project's collection
(embeddedDefinitions()), and the wires ending on it, as they are.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ispyisail
2026-10-19 17:21:45 +13:00
parent 7f05b23062
commit 833ed0f523
3 changed files with 51 additions and 4 deletions
+2 -1
View File
@@ -77,9 +77,10 @@ class tst_qetcontainer : public QObject
{
QDomDocument copy = document.cloneNode(true).toDocument();
const bool own_uuids = QetContainer::ownUuids(copy.documentElement());
const QSet<QString> defined = QetContainer::embeddedDefinitions(copy.documentElement());
for (QDomElement diagram = copy.documentElement().firstChildElement(QStringLiteral("diagram"));
!diagram.isNull() ; diagram = diagram.nextSiblingElement(QStringLiteral("diagram")))
QetContainer::dropComputed(diagram, own_uuids);
QetContainer::dropComputed(diagram, own_uuids, defined);
return copy;
}