Diffstat (limited to 'noncore/net/wellenreiter/cornucopia/olistview.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/cornucopia/olistview.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/noncore/net/wellenreiter/cornucopia/olistview.cpp b/noncore/net/wellenreiter/cornucopia/olistview.cpp index f2d3730..c292eb9 100644 --- a/noncore/net/wellenreiter/cornucopia/olistview.cpp +++ b/noncore/net/wellenreiter/cornucopia/olistview.cpp @@ -124,4 +124,9 @@ void OListView::setColumnSeparator( const QPen& p ) } +OListViewItem* OListView::childFactory() +{ + return new OListViewItem( this ); +} + #ifndef QT_NO_DATASTREAM void OListView::serializeTo( QDataStream& s ) const @@ -181,5 +186,5 @@ void OListView::serializeFrom( QDataStream& s ) for ( int i = 0; i < items; ++i ) { - OListViewItem* item = new OListViewItem( this ); + OListViewItem* item = childFactory(); s >> *item; } @@ -338,4 +343,9 @@ void OListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, in } +OListViewItem* OListViewItem::childFactory() +{ + return new OListViewItem( this ); +} + #ifndef QT_NO_DATASTREAM void OListViewItem::serializeTo( QDataStream& s ) const @@ -389,5 +399,5 @@ void OListViewItem::serializeFrom( QDataStream& s ) for ( int i = 0; i < items; ++i ) { - OListViewItem* item = new OListViewItem( this ); + OListViewItem* item = childFactory(); s >> (*item); } |