diff options
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/kernel/qmetatype.cpp | 7 | ||||
-rw-r--r-- | src/corelib/kernel/qmetatype.h | 6 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp index af838ab090..dbc11c57ec 100644 --- a/src/corelib/kernel/qmetatype.cpp +++ b/src/corelib/kernel/qmetatype.cpp @@ -377,6 +377,13 @@ struct DefinedTypesFilter { */ /*! + \fn int QMetaType::id() const + \since 5.13 + + Returns id type hold by this QMetatype instance. +*/ + +/*! \fn bool QMetaType::sizeOf() const \since 5.0 diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h index ed7feee775..0bf430bb26 100644 --- a/src/corelib/kernel/qmetatype.h +++ b/src/corelib/kernel/qmetatype.h @@ -570,6 +570,7 @@ public: inline bool isValid() const; inline bool isRegistered() const; + inline int id() const; inline int sizeOf() const; inline TypeFlags flags() const; inline const QMetaObject *metaObject() const; @@ -2221,6 +2222,11 @@ inline bool QMetaType::isRegistered() const return isValid(); } +inline int QMetaType::id() const +{ + return m_typeId; +} + inline void *QMetaType::create(const void *copy) const { // ### TODO Qt6 remove the extension |