Still works...
This commit is contained in:
@@ -34,29 +34,6 @@ XQMainModel::XQMainModel(QObject *parent )
|
||||
|
||||
}
|
||||
|
||||
//! initialisiert dieses model über den namen.
|
||||
|
||||
void XQMainModel::initModel(const QString& modelName)
|
||||
{
|
||||
|
||||
// model rootnode finden -> <DocumentTreeModel>
|
||||
XQNodePtr modelSheet = _itemFactory.findModelSheet( modelName ); // throws
|
||||
|
||||
// #1: über alle sections
|
||||
for( auto& section : modelSheet->children() )
|
||||
{
|
||||
// #2: (optionalen) header erzeugen
|
||||
const XQNodePtr header = section->find_child_by_tag_name( "Header");
|
||||
if( header )
|
||||
{
|
||||
XQItemList list = _itemFactory.makeHeader( header );
|
||||
Q_ASSERT(!list.isEmpty());
|
||||
addSection(list, section );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//! erzeugt einen eintrag in der baum-übersicht.
|
||||
|
||||
@@ -79,7 +56,7 @@ XQItem* XQMainModel::createTreeEntry( XQNodePtr contentNode )
|
||||
return newTreeentry;
|
||||
}
|
||||
}
|
||||
throw XQException( "createTreeEntry: main model should not be emtpy!" );
|
||||
throw XQException( "createTreeEntry: main model should not be empty!" );
|
||||
}
|
||||
|
||||
//! leere default implementation
|
||||
|
Reference in New Issue
Block a user