summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Trahearn <mtrahearn@topcon.com>2022-08-29 17:18:06 +1000
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-09-01 18:45:26 +0000
commitabaf1aa13444df9930173451585d6be6b8c0d8c4 (patch)
treebab3fdf0601338a900e9c339df01ab49ada3e07a
parentcb61bea5913e75edd94d73f527ceb88769e8556f (diff)
Doc: Update QMetaType::metaObject() descriptions
Change-Id: Iff93f8fe2cf701d56d072e2593c76d49a70fc183 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit e27ecb203538208157e3e0e710ae54ab8bd2a844) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/corelib/kernel/qmetatype.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp
index 0962c57fad..51c234e90c 100644
--- a/src/corelib/kernel/qmetatype.cpp
+++ b/src/corelib/kernel/qmetatype.cpp
@@ -555,19 +555,21 @@ int QMetaType::idHelper() const
\fn constexpr const QMetaObject *QMetaType::metaObject() const
\since 5.5
- return a QMetaObject relative to this type.
+ Returns a QMetaObject relative to this type.
If the type is a pointer type to a subclass of QObject, flags() contains
- QMetaType::PointerToQObject and this function returns the corresponding QMetaObject. This can
- be used to in combination with QMetaObject::construct to create QObject of this type.
-
- If the type is a Q_GADGET, flags() contains QMetaType::IsGadget, and this function returns its
- QMetaObject. This can be used to retrieve QMetaMethod and QMetaProperty and use them on a
- pointer of this type. (given by QVariant::data for example)
-
- If the type is an enumeration, flags() contains QMetaType::IsEnumeration, and this function
- returns the QMetaObject of the enclosing object if the enum was registered as a Q_ENUM or
- \nullptr otherwise
+ QMetaType::PointerToQObject and this function returns the corresponding QMetaObject.
+ This can be used in combination with QMetaObject::newInstance() to create QObjects of this type.
+
+ If the type is a Q_GADGET, flags() contains QMetaType::IsGadget.
+ If the type is a pointer to a Q_GADGET, flags() contains QMetaType::PointerToGadget.
+ In both cases, this function returns its QMetaObject.
+ This can be used to retrieve QMetaMethod and QMetaProperty and use them on a
+ pointer of this type for example, as given by QVariant::data().
+
+ If the type is an enumeration, flags() contains QMetaType::IsEnumeration.
+ In this case, this function returns the QMetaObject of the enclosing
+ object if the enum was registered as a Q_ENUM or \nullptr otherwise.
\sa QMetaType::flags()
*/