diff options
-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() { |