diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-10-25 15:37:12 +0100 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-10-26 03:32:58 +0100 |
commit | 6419dd972dcbce88bc71ca1593b5ba90ad789fb6 (patch) | |
tree | 4ec4f383438e70a119b1a38d467d3e50e73f8902 /src/corelib/kernel | |
parent | 66c94b83565d2db79307124b6cd797da33a5a7ef (diff) |
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>
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r-- | src/corelib/kernel/qvariant.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index f2e2ae2c2e..8d4bb38dc6 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -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() { |