summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qmetaobjectbuilder.cpp
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2021-05-02 02:48:33 +0200
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2021-05-13 14:29:50 +0200
commit37e3b988c27d26add5c91e478cf3d3260d172e9d (patch)
treebcf5f6654ad3248eaaa9c481ee98882fa0ca47e1 /src/corelib/kernel/qmetaobjectbuilder.cpp
parent81bb764e9886de17260d6c7d01ff7e39c23f47f4 (diff)
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>
Diffstat (limited to 'src/corelib/kernel/qmetaobjectbuilder.cpp')
-rw-r--r--src/corelib/kernel/qmetaobjectbuilder.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/kernel/qmetaobjectbuilder.cpp b/src/corelib/kernel/qmetaobjectbuilder.cpp
index 8513805ef4..8bcc6e398a 100644
--- a/src/corelib/kernel/qmetaobjectbuilder.cpp
+++ b/src/corelib/kernel/qmetaobjectbuilder.cpp
@@ -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.