summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qmetatype.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2014-08-10 14:11:26 +0200
committerOlivier Goffart (Woboq GmbH) <ogoffart@woboq.com>2015-02-05 14:27:59 +0000
commitd43d03529f7bc169776be161c2978856eefb0e93 (patch)
tree6a0d69842699351012a10d375467ea11a25c4bbc /src/corelib/kernel/qmetatype.cpp
parent9e6190cff3f78428eb4bedbb3f267f3d7a43f469 (diff)
QMetatype: Register the QMetaObject of a Q_ENUM or Q_FLAG
Change-Id: Id1343c3fb51d88a43d4d97e8859dbe2b0cfbea34 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src/corelib/kernel/qmetatype.cpp')
-rw-r--r--src/corelib/kernel/qmetatype.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp
index aae772ffeb..f9092b0a32 100644
--- a/src/corelib/kernel/qmetatype.cpp
+++ b/src/corelib/kernel/qmetatype.cpp
@@ -282,7 +282,7 @@ struct DefinedTypesFilter {
\value NeedsDestruction This type has a non-trivial destructor. If the flag is not set calls to the destructor are not necessary before discarding objects.
\value MovableType An instance of a type having this attribute can be safely moved by memcpy.
\omitvalue SharedPointerToQObject
- \omitvalue IsEnumeration
+ \value IsEnumeration This type is an enumeration
\value PointerToQObject This type is a pointer to a derived of QObject
\omitvalue WeakPointerToQObject
\omitvalue TrackingPointerToQObject
@@ -376,6 +376,10 @@ struct DefinedTypesFilter {
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 enumaration, flags contains QMetaType::IsEnumeration, and this function
+ returns the QMetaObject of the enclosing object if the enum was registered as a Q_ENUM or 0
+ otherwise
+
\sa QMetaType::metaObjectForType(), QMetaType::flags()
*/