Document QVariant::data/constData

QMetaSequence refers to those members, and QMetaType operates on void*s,
and documents such low-level APIs as well, so can't think of a reason
why we should not document the QVariant getters as well.

Change-Id: Id18de839bb0e4f5559b28bfca80eaabab1eb6479
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
bb10
Volker Hilsheimer 2020-10-25 15:37:12 +01:00
parent 66c94b8356
commit 6419dd972d
1 changed files with 12 additions and 2 deletions

View File

@ -2391,11 +2391,21 @@ std::optional<int> QVariant::compare(const QVariant &lhs, const QVariant &rhs)
/*!
\fn const void *QVariant::constData() const
\fn const void* QVariant::data() const
\internal
Returns a pointer to the contained object as a generic void* that cannot be
written to.
\sa QMetaType
*/
/*!
\internal
Returns a pointer to the contained object as a generic void* that can be
written to.
This function detaches the QVariant. When called on a \l{isNull}{null-QVariant},
the QVariant will not be null after the call.
\sa QMetaType
*/
void *QVariant::data()
{