Moved child row creation to XQItemFactory, some other cleanups.
This commit is contained in:
@@ -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').
|
||||
|
||||
Reference in New Issue
Block a user