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()
|
||||
*/
|
||||
|
||||
/*! \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
|
||||
|
||||
|
@ -287,7 +287,8 @@ public:
|
||||
{ int t = userType(); return t >= QMetaType::User ? QVariant::UserType : QVariant::Type(t); }
|
||||
QT_WARNING_POP
|
||||
#endif
|
||||
int userType() const { return metaType().id(); }
|
||||
int userType() const { return typeId(); }
|
||||
int typeId() const { return metaType().id(); }
|
||||
QMetaType metaType() const;
|
||||
int propertyIndex() const;
|
||||
int relativePropertyIndex() const;
|
||||
|
@ -242,8 +242,9 @@ class Q_CORE_EXPORT QVariant
|
||||
|
||||
inline void swap(QVariant &other) noexcept { qSwap(d, other.d); }
|
||||
|
||||
int typeId() const { return d.typeId(); }
|
||||
int userType() const { return d.typeId(); }
|
||||
int userType() const { return typeId(); }
|
||||
int typeId() const { return metaType().id(); }
|
||||
|
||||
const char *typeName() const;
|
||||
QMetaType metaType() const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user