Moved child row creation to XQItemFactory, some other cleanups.

This commit is contained in:
2025-09-28 14:15:18 +02:00
parent 007970f4ee
commit f74c004bf9
7 changed files with 32 additions and 56 deletions

View File

@@ -167,13 +167,23 @@ XQItemList XQItemFactory::makeRow(const XQNodePtr& sheetNode, const XQNodePtr& c
return list;
}
XQItemList XQItemFactory::makeChildRow( XQItem* parent, const XQNodePtr& sheetNode, const XQNodePtr& contentNode )
{
Q_UNUSED(parent);
Q_UNUSED(sheetNode);
Q_UNUSED(contentNode);
return XQItemList();
//! Erzeugt kind-items zu einem section-eintrag.
XQItemList XQItemFactory::makeChildRow( const XQNodePtr& sheetNode, const XQNodePtr& contentNode )
{
XQItemList list;
for (const auto& contentChild : contentNode->children())
{
const QString& contentKey = contentChild->tag_name();
// wir brauchen ein beschreibenden sheetnode für diesen content-child knoten
if( sheetNode->has_child( contentKey ))
{
const XQNodePtr& sheetChild = sheetNode->child(contentKey);
list = makeRow( sheetChild, contentChild );
}
}
return list;
}
//! Erzeugt ein XQItem aus einer typ-beschreibung ('sheetNode') und einem daten-knoten ('contentNode').