QList: add data_ptr() methods like the ones in QString/QBA

It will be used in a suqsequent commit (adding QString::{to,from}Utf32).

Change-Id: Ie113a47f0ff0e9a7b26a6d0f47e17d24a4a88465
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Ahmad Samir 2024-12-31 23:01:58 +02:00
parent 8aef5b0d8f
commit 343cc50c22
2 changed files with 11 additions and 0 deletions

View File

@ -107,6 +107,9 @@ public:
using rvalue_ref = T &&;
#endif
DataPointer &data_ptr() { return d; }
const DataPointer &data_ptr() const { return d; }
class const_iterator;
class iterator {
friend class QList<T>;

View File

@ -1638,3 +1638,11 @@
This function only allocates memory if the number of elements in \a l
exceeds the capacity of this list or this list is shared.
*/
/*!
\fn template <typename T> QList<T>::DataPointer &QList<T>::data_ptr();
\fn template <typename T> const QList<T>::DataPointer &QList<T>::data_ptr() const;
\internal
\since 6.10
*/