Standardize metaType stuff in QMetaProperty and QVariant
Change-Id: Idbb03d320039e8ddc4b7a7f42d2ba93ee47c456f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
parent
6032a9ca1a
commit
801e703a79
@ -2957,6 +2957,15 @@ const char *QMetaProperty::typeName() const
|
|||||||
\sa type(), QMetaType, typeName(), metaType()
|
\sa type(), QMetaType, typeName(), metaType()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*! \fn int QMetaProperty::typeId() const
|
||||||
|
\since 6.0
|
||||||
|
|
||||||
|
Returns the storage type of the property. This is
|
||||||
|
the same as metaType().id().
|
||||||
|
|
||||||
|
\sa QMetaType, typeName(), metaType()
|
||||||
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\since 6.0
|
\since 6.0
|
||||||
|
|
||||||
|
@ -287,7 +287,8 @@ public:
|
|||||||
{ int t = userType(); return t >= QMetaType::User ? QVariant::UserType : QVariant::Type(t); }
|
{ int t = userType(); return t >= QMetaType::User ? QVariant::UserType : QVariant::Type(t); }
|
||||||
QT_WARNING_POP
|
QT_WARNING_POP
|
||||||
#endif
|
#endif
|
||||||
int userType() const { return metaType().id(); }
|
int userType() const { return typeId(); }
|
||||||
|
int typeId() const { return metaType().id(); }
|
||||||
QMetaType metaType() const;
|
QMetaType metaType() const;
|
||||||
int propertyIndex() const;
|
int propertyIndex() const;
|
||||||
int relativePropertyIndex() const;
|
int relativePropertyIndex() const;
|
||||||
|
@ -242,8 +242,9 @@ class Q_CORE_EXPORT QVariant
|
|||||||
|
|
||||||
inline void swap(QVariant &other) noexcept { qSwap(d, other.d); }
|
inline void swap(QVariant &other) noexcept { qSwap(d, other.d); }
|
||||||
|
|
||||||
int typeId() const { return d.typeId(); }
|
int userType() const { return typeId(); }
|
||||||
int userType() const { return d.typeId(); }
|
int typeId() const { return metaType().id(); }
|
||||||
|
|
||||||
const char *typeName() const;
|
const char *typeName() const;
|
||||||
QMetaType metaType() const;
|
QMetaType metaType() const;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user