Merge remote-tracking branch 'upstream/master' into wiring-manager

Conflicts resolved in 24 files. Notable decisions:

- ico/icon-themes.qrc: upstream's icon folder restructure kept; the 36
  cable icon entries re-added under the new qet/qet-dark path scheme
  (XML valid, every referenced file exists).
- Toolbar system: upstream's DiagramToolbarSettings now owns the
  toolbar filling. The cable tool is registered as
  diagrameditor.add_cable (generic group loop) and listed on the
  "diagram" toolbar right after the auto-break conductor action,
  separated by a divider, exactly like before the merge.
- Paste: the cable lines of a copy are handed to
  PasteNumberingImport::push() as extra commands, so paste + cable
  lines + the numbering question stay ONE undo step on both paste
  paths (DiagramView::paste and DiagramEventAddPaste::commit).
- PDF links: upstream's deterministic link sorting kept together with
  the cable cross-reference injector (injectLinkTo -> links list).
- Element renumbering: upstream's ElementAutoNumSchemeCommand::renumber
  replaces the old formula-based body of
  QETProject::renumberElementsBySchemeTitle; the cable numbering rule
  API (cableAutoNum, axis priority, rule name) is kept in full.
- Auto-numbering pages: upstream's scheme management kept, the Câbles
  tab added as index 4 (changeToCableTab), both entry points
  changeToCable() and changeToElement() kept side by side.
- SelectAutonumW: dirty tracking and the contextEdited signal moved
  into upstream's insertPartRow() row API, so single-rule mode, the
  rule-removable button and "confirm without change leaves the project
  alone" keep working.
- xrefpropertieswidget: upstream's offset clamping kept; the cable
  branch (Texte field, Police button, hidden display options) kept;
  the stack-overlapping checkbox is hidden for cables.

Verified after the merge: build green (515/515, no errors), ctest
85/86 (only the pre-existing headless tst_menubarkeyboard failure),
offscreen smoke exit 124.
This commit is contained in:
Kellermorph
2026-10-09 14:09:08 +02:00
1767 changed files with 194544 additions and 72846 deletions
+34 -4
View File
@@ -58,7 +58,32 @@ QStringList BomExport::defaultColumns()
};
}
QString BomExport::defaultQuery()
/**
@brief BomExport::junctionFilter
@return a condition true for every row that is not a junction: a
terminal-type element with no label and no part data. Some users draw
the dots and bends where wires branch as their own terminal-type
symbols, and each one became an empty row of the parts list (#1178).
A terminal block with a label or a part number is kept.
*/
QString BomExport::junctionFilter()
{
return QStringLiteral("NOT (element_type = 'terminal' "
"AND IFNULL(label, '') = '' "
"AND IFNULL(designation, '') = '' "
"AND IFNULL(manufacturer, '') = '' "
"AND IFNULL(manufacturer_reference, '') = '')");
}
/**
@brief BomExport::defaultQuery
@param include_slaves : false leaves out the contact blocks (slave
elements), which otherwise appear as rows of their own
@param include_junctions : false leaves out the junctions, see
junctionFilter()
@return the query of the parts list
*/
QString BomExport::defaultQuery(bool include_slaves, bool include_junctions)
{
//Slaves and terminals are included because both are routinely
//separately orderable hardware. A circuit breaker can carry ten or
@@ -78,11 +103,16 @@ QString BomExport::defaultQuery()
//and the conductor definition stay out because they are not hardware.
//
//See discussion #847.
const QString types = include_slaves
? QStringLiteral("'simple', 'master', 'slave', 'terminal'")
: QStringLiteral("'simple', 'master', 'terminal'");
const QString junctions = include_junctions
? QString()
: QStringLiteral(" AND ") + junctionFilter();
return QStringLiteral("SELECT %1 FROM element_nomenclature_view "
"WHERE element_type IN "
"('simple', 'master', 'slave', 'terminal') "
"WHERE element_type IN (%2)%3 "
"ORDER BY diagram_position, position, label")
.arg(defaultColumns().join(QStringLiteral(", ")));
.arg(defaultColumns().join(QStringLiteral(", ")), types, junctions);
}
QByteArray BomExport::toCsv(QSqlQuery &query, const QStringList &headers,