diff options
Diffstat (limited to 'src/corelib/tools/qlinkedlist.h')
-rw-r--r-- | src/corelib/tools/qlinkedlist.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/tools/qlinkedlist.h b/src/corelib/tools/qlinkedlist.h index 279eda673a..e8696eb5f9 100644 --- a/src/corelib/tools/qlinkedlist.h +++ b/src/corelib/tools/qlinkedlist.h @@ -95,8 +95,8 @@ public: inline int size() const { return d->size; } inline void detach() - { if (d->ref != 1) detach_helper(); } - inline bool isDetached() const { return d->ref == 1; } + { if (d->ref.isShared()) detach_helper(); } + inline bool isDetached() const { return !d->ref.isShared(); } inline void setSharable(bool sharable) { if (!sharable) detach(); if (d != &QLinkedListData::shared_null) d->sharable = sharable; } inline bool isSharedWith(const QLinkedList<T> &other) const { return d == other.d; } |