QMetaObjectBuilder: replace an int with QFlags

The int was used as a flag the entire time, except in one stance.
So just use the right QFlags type instead, and replace that one usage
with a call to toInt().

Change-Id: I3670e6afdc244df69189dd15b8c2c34573476e2f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
bb10
Giuseppe D'Angelo 2021-05-02 02:48:33 +02:00
parent 81bb764e98
commit 37e3b988c2
1 changed files with 3 additions and 3 deletions

View File

@ -224,7 +224,7 @@ public:
QList<QByteArray> classInfoValues;
std::vector<QMetaEnumBuilderPrivate> enumerators;
QList<const QMetaObject *> relatedMetaObjects;
int flags;
MetaObjectFlags flags;
};
bool QMetaObjectBuilderPrivate::hasRevisionedMethods() const
@ -325,7 +325,7 @@ void QMetaObjectBuilder::setSuperClass(const QMetaObject *meta)
*/
MetaObjectFlags QMetaObjectBuilder::flags() const
{
return MetaObjectFlags(d->flags);
return d->flags;
}
/*!
@ -1205,7 +1205,7 @@ static int buildMetaObject(QMetaObjectBuilderPrivate *d, char *buf,
if constexpr (mode == Construct) {
static_assert(QMetaObjectPrivate::OutputRevision == 10, "QMetaObjectBuilder should generate the same version as moc");
pmeta->revision = QMetaObjectPrivate::OutputRevision;
pmeta->flags = d->flags;
pmeta->flags = d->flags.toInt();
pmeta->className = 0; // Class name is always the first string.
//pmeta->signalCount is handled in the "output method loop" as an optimization.