diff options
Diffstat (limited to 'src/corelib/kernel/qmetaobject.cpp')
-rw-r--r-- | src/corelib/kernel/qmetaobject.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp index 8d304bd890..05662b385a 100644 --- a/src/corelib/kernel/qmetaobject.cpp +++ b/src/corelib/kernel/qmetaobject.cpp @@ -1798,6 +1798,7 @@ bool QMetaObject::invokeMethodImpl(QObject *object, QtPrivate::QSlotObjectBase * function. \ingroup objectmodel + \compares equality A QMetaMethod has a methodType(), a methodSignature(), a list of parameterTypes() and parameterNames(), a return typeName(), a @@ -1825,19 +1826,19 @@ bool QMetaObject::invokeMethodImpl(QObject *object, QtPrivate::QSlotObjectBase * invoked), otherwise returns \c false. */ -/*! \fn bool QMetaMethod::operator==(const QMetaMethod &m1, const QMetaMethod &m2) +/*! \fn bool QMetaMethod::operator==(const QMetaMethod &lhs, const QMetaMethod &rhs) \since 5.0 \overload - Returns \c true if method \a m1 is equal to method \a m2, + Returns \c true if method \a lhs is equal to method \a rhs, otherwise returns \c false. */ -/*! \fn bool QMetaMethod::operator!=(const QMetaMethod &m1, const QMetaMethod &m2) +/*! \fn bool QMetaMethod::operator!=(const QMetaMethod &lhs, const QMetaMethod &rhs) \since 5.0 \overload - Returns \c true if method \a m1 is not equal to method \a m2, + Returns \c true if method \a lhs is not equal to method \a rhs, otherwise returns \c false. */ @@ -3655,8 +3656,8 @@ QMetaProperty::QMetaProperty(const QMetaObject *mobj, int index) data(getMetaPropertyData(mobj, index)) { Q_ASSERT(index >= 0 && index < priv(mobj->d.data)->propertyCount); - - if (!(data.flags() & EnumOrFlag)) + // The code below here just resolves menum if the property is an enum type: + if (!(data.flags() & EnumOrFlag) || !metaType().flags().testFlag(QMetaType::IsEnumeration)) return; QByteArrayView enum_name = typeNameFromTypeInfo(mobj, data.type()); menum = mobj->enumerator(QMetaObjectPrivate::indexOfEnumerator(mobj, enum_name)); |