Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
\internal
*/
-/*! \fn void QList::detachShared()
-
- \internal
-
- like detach(), but does nothing if we're shared_null.
- This prevents needless mallocs, and makes QList more exception safe
- in case of cleanup work done in destructors on empty lists.
-*/
-
/*! \fn bool QList::isDetached() const
\internal
inline void detach() { if (d->ref != 1) detach_helper(); }
- inline void detachShared()
- {
- // The "this->" qualification is needed for GCCE.
- if (d->ref != 1 && this->d != &QListData::shared_null)
- detach_helper();
- }
-
inline bool isDetached() const { return d->ref == 1; }
inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; }
inline bool isSharedWith(const QList<T> &other) const { return d == other.d; }