diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h index 45ecac01574..30c78c2c4dc 100644 --- a/src/corelib/tools/qlist.h +++ b/src/corelib/tools/qlist.h @@ -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; diff --git a/src/corelib/tools/qlist.qdoc b/src/corelib/tools/qlist.qdoc index 9b540e110c1..ce7dabe39b2 100644 --- a/src/corelib/tools/qlist.qdoc +++ b/src/corelib/tools/qlist.qdoc @@ -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 QList::DataPointer &QList::data_ptr(); + \fn template const QList::DataPointer &QList::data_ptr() const; + + \internal + \since 6.10 +*/