diff options
Diffstat (limited to 'src/corelib/tools/qlist.h')
-rw-r--r-- | src/corelib/tools/qlist.h | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h index f8f62cc8b2..b4c35b8d35 100644 --- a/src/corelib/tools/qlist.h +++ b/src/corelib/tools/qlist.h @@ -79,9 +79,6 @@ struct Q_CORE_EXPORT QListData { Data *detach(int alloc); Data *detach_grow(int *i, int n); - Data *detach(); // remove in 5.0 - Data *detach2(); // remove in 5.0 - Data *detach3(); // remove in 5.0 void realloc(int alloc); static Data shared_null; Data *d; @@ -89,7 +86,6 @@ struct Q_CORE_EXPORT QListData { void **append(int n); void **append(); void **append(const QListData &l); - void **append2(const QListData &l); // remove in 5.0 void **prepend(); void **insert(int i); void remove(int i); @@ -338,7 +334,7 @@ private: Node *detach_helper_grow(int i, int n); void detach_helper(int alloc); void detach_helper(); - void free(QListData::Data *d); + void dealloc(QListData::Data *d); void node_construct(Node *n, const T &t); void node_destruct(Node *n); @@ -426,7 +422,7 @@ Q_INLINE_TEMPLATE QList<T> &QList<T>::operator=(const QList<T> &l) QListData::Data *o = l.d; o->ref.ref(); if (!d->ref.deref()) - free(d); + dealloc(d); d = o; if (!d->sharable) detach_helper(); @@ -683,7 +679,7 @@ Q_OUTOFLINE_TEMPLATE typename QList<T>::Node *QList<T>::detach_helper_grow(int i } if (!x->ref.deref()) - free(x); + dealloc(x); return reinterpret_cast<Node *>(p.begin() + i); } @@ -702,7 +698,7 @@ Q_OUTOFLINE_TEMPLATE void QList<T>::detach_helper(int alloc) } if (!x->ref.deref()) - free(x); + dealloc(x); } template <typename T> @@ -715,7 +711,7 @@ template <typename T> Q_OUTOFLINE_TEMPLATE QList<T>::~QList() { if (!d->ref.deref()) - free(d); + dealloc(d); } template <typename T> @@ -736,9 +732,8 @@ Q_OUTOFLINE_TEMPLATE bool QList<T>::operator==(const QList<T> &l) const return true; } -// ### Qt 5: rename freeData() to avoid confusion with std::free() template <typename T> -Q_OUTOFLINE_TEMPLATE void QList<T>::free(QListData::Data *data) +Q_OUTOFLINE_TEMPLATE void QList<T>::dealloc(QListData::Data *data) { node_destruct(reinterpret_cast<Node *>(data->array + data->begin), reinterpret_cast<Node *>(data->array + data->end)); @@ -802,7 +797,7 @@ Q_OUTOFLINE_TEMPLATE QList<T> &QList<T>::operator+=(const QList<T> &l) } else { Node *n = (d->ref != 1) ? detach_helper_grow(INT_MAX, l.size()) - : reinterpret_cast<Node *>(p.append2(l.p)); + : reinterpret_cast<Node *>(p.append(l.p)); QT_TRY { node_copy(n, reinterpret_cast<Node *>(p.end()), reinterpret_cast<Node *>(l.p.begin())); |