mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-15 01:54:14 +02:00
Export the wiring list without building every folio (stage D5)
The wiring list export read the project as QETProject::toXml() writes it, which builds every folio. It now reads a document made without building: a built folio written as saving writes it (QETProject::folioXml(), which keeps its symbols' links to partners not built), a folio not built copied from its XML, and what QElectroTech computes for a wire's ends -- its symbols' labels, their last partner's label, the terminals' names -- filled in from the symbols built and from the project database. A symbol still waiting for a partner not built takes its partners from the database, saved order. 136-folio .qetz, wiring list from the command line: 30.1 s with every folio built, 4.5 s lazily, same file. tst_lazyfolios: the wiring list of a .qet and of a .qetz as when built, building no folio. New corpus gate (it fails on all 6 projects tried with terminal names broken): --export-cables and --export-wires lazily from the .qet and the .qetz = eager on 342 projects; one (forum f3386) differed until waiting symbols took their partners from the database. ctest 96/96 eager and lazy (one earlier run had modal_quit_regression and tst_resaveunchanged fail once each, both passing on rerun in both modes); 342 corpus projects save the same in all four arms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2978,6 +2978,20 @@ bool QETProject::usesElement(const ElementsLocation &location) const
|
||||
return(unbuiltFolioElements().contains(location));
|
||||
}
|
||||
|
||||
/**
|
||||
@brief QETProject::folioXml
|
||||
@return the built folio @p folio written as saving writes it: its
|
||||
symbols keep the links to partners on folios not built yet
|
||||
(QET_LAZY_FOLIOS), which Diagram::toXml() alone leaves out
|
||||
*/
|
||||
QDomDocument QETProject::folioXml(Diagram *folio)
|
||||
{
|
||||
m_waiting_link_targets = unloadedFolioCount() ? symbolsOnUnbuiltFolios() : QSet<QUuid>();
|
||||
const QDomDocument xml = folio->toXml();
|
||||
m_waiting_link_targets.clear();
|
||||
return xml;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief QETProject::buildFoliosHoldingTables
|
||||
Build the folios not built yet (QET_LAZY_FOLIOS) that hold a drawn
|
||||
|
||||
Reference in New Issue
Block a user