Source Code (Use browser search to find items of interest.)

Class Index

qt'QCollection (./qt-2.1.0/src/tools/qcollection.h:39)

class Q_EXPORT QCollection			// inherited by all collections
{
public:
    bool autoDelete()	const	       { return del_item; }
    void setAutoDelete( bool enable )  { del_item = enable; }

    virtual uint  count() const = 0;
    virtual void  clear() = 0;			// delete all objects

    typedef void *Item;				// generic collection item

protected:
    QCollection() { del_item = FALSE; }		// no deletion of objects
    QCollection(const QCollection &) { del_item = FALSE; }
    virtual ~QCollection() {}

    bool del_item;				// default FALSE

    virtual Item	     newItem( Item );		// create object
    virtual void     deleteItem( Item );		// delete object
};


qt'QCollection::deleteItem() (./qt-2.1.0/src/tools/qcollection.cpp:162)

void QCollection::deleteItem( Item d )
{
    if ( del_item )
	delete d;				// default operation
}