QMetaProperty: use early return
This improves readability. Change-Id: I6552463b5f14d79b99efd3c0633695401bdb7f78 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
ba6c1d2785
commit
e441985534
@ -3182,10 +3182,12 @@ QMetaProperty::QMetaProperty(const QMetaObject *mobj, int index)
|
||||
{
|
||||
Q_ASSERT(index >= 0 && index < priv(mobj->d.data)->propertyCount);
|
||||
|
||||
if (data.flags() & EnumOrFlag) {
|
||||
if (!(data.flags() & EnumOrFlag))
|
||||
return;
|
||||
const char *type = rawTypeNameFromTypeInfo(mobj, data.type());
|
||||
menum = mobj->enumerator(mobj->indexOfEnumerator(type));
|
||||
if (!menum.isValid()) {
|
||||
if (menum.isValid())
|
||||
return;
|
||||
const char *enum_name = type;
|
||||
const char *scope_name = objectClassName(mobj);
|
||||
char *scope_buffer = nullptr;
|
||||
@ -3212,8 +3214,6 @@ QMetaProperty::QMetaProperty(const QMetaObject *mobj, int index)
|
||||
if (scope_buffer)
|
||||
free(scope_buffer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
\internal
|
||||
|
Loading…
x
Reference in New Issue
Block a user