happy crashing
This commit is contained in:
@@ -77,7 +77,6 @@ bool XQItemFactory::isValid()
|
||||
XQItemType* XQItemFactory::makeItemType(const XQNodePtr& sheetEntry )
|
||||
{
|
||||
QString typeKey = sheetEntry->attribute( c_ItemType );
|
||||
|
||||
XQItemType* itemType = findItemTypeTemplate(typeKey);
|
||||
|
||||
// wir prüfen, ob im sheetEntry noch zusätzliche attribute vorhanden
|
||||
@@ -266,17 +265,18 @@ QVariant XQItemFactory::makeVariant( int dataRole, const QString& source ) const
|
||||
|
||||
XQItem* XQItemFactory::makeItem( const XQNodePtr& sheetNode, const XQNodePtr& contentNode )
|
||||
{
|
||||
// den itemtype des neuen items rausfinden
|
||||
XQItemType* itemType = makeItemType(sheetNode); // throws
|
||||
|
||||
// das ist Unterschied zum normalen Item: Der Titel kommt aus der Modelbeschreibung
|
||||
// der content wird indirect über den tag-name des sheetnode geholt
|
||||
|
||||
const QString* contentPtr{};
|
||||
// das ist Unterschied vom HeaderItem zum normalen Item: Der Titel kommt aus der Modelbeschreibung
|
||||
if(!contentNode)
|
||||
contentPtr = sheetNode->attribute_ptr(c_Caption);
|
||||
else
|
||||
// der content wird indirect über den tag-name des sheetnode geholt
|
||||
contentPtr = contentNode->attribute_ptr( sheetNode->tag_name() );
|
||||
return makeItem( sheetNode, sheetNode->attribute(c_Caption) );
|
||||
|
||||
// der content wird indirect über den tag-name des sheetnode geholt
|
||||
const QString* contentPtr = contentNode->attribute_ptr( sheetNode->tag_name() );
|
||||
return makeItem( sheetNode, contentPtr );
|
||||
}
|
||||
|
||||
@@ -284,10 +284,7 @@ XQItem* XQItemFactory::makeItem( const XQNodePtr& sheetNode, const XQNodePtr& co
|
||||
XQItem* XQItemFactory::makeItem( const XQNodePtr& sheetNode, const QString* contentPtr )
|
||||
{
|
||||
// den itemtype des neuen items rausfinden
|
||||
QString typeKey = sheetNode->attribute(c_ItemType);
|
||||
|
||||
XQItemType* itemType = makeItemType(sheetNode); // throws
|
||||
|
||||
XQItem* newItem = new XQItem( itemType, contentPtr );
|
||||
|
||||
// __fixme!
|
||||
@@ -299,6 +296,19 @@ XQItem* XQItemFactory::makeItem( const XQNodePtr& sheetNode, const QString* cont
|
||||
return newItem;
|
||||
}
|
||||
|
||||
XQStaticItem* XQItemFactory::makeStaticItem( const XQNodePtr& sheetNode, const QString& content )
|
||||
{
|
||||
XQItemType* itemType = makeItemType(sheetNode); // throws
|
||||
XQStaticItem* newItem = new XQStaticItem( itemType, content );
|
||||
// __fixme!
|
||||
if( newItem->isCheckable() )
|
||||
{
|
||||
newItem->setCheckState( Qt::Checked );
|
||||
}
|
||||
return newItem;
|
||||
|
||||
}
|
||||
|
||||
|
||||
//! erzeugt eine item-row.
|
||||
|
||||
|
Reference in New Issue
Block a user