QMetaObject: add revision 11 for Qt 6.5
We changed qTryMetaTypeInterfaceForType() so it does record void and void* (see commit2d0c31e7d9
and commit3695b35dfc
). By incrementing the revision number, we make it possible to determine at runtime whether the new information ought to be present. We may add even more types (namely, non-const references) before 6.5.0 is out. For pointers, the restriction remains that the metatype is recorded only if the pointer is a pointer to a complete type. Change-Id: Ic6547f8247454b47baa8fffd170dad79b1a90f6b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
parent
c1bdaf0a1a
commit
d2e9d70ec1
@ -170,7 +170,8 @@ struct QMetaObjectPrivate
|
||||
// revision 9 is Qt 6.0: It adds the metatype of properties and methods
|
||||
// revision 10 is Qt 6.2: The metatype of the metaobject is stored in the metatypes array
|
||||
// and metamethods store a flag stating whether they are const
|
||||
enum { OutputRevision = 10 }; // Used by moc, qmetaobjectbuilder and qdbus
|
||||
// revision 11 is Qt 6.5: The metatype for void is stored in the metatypes array
|
||||
enum { OutputRevision = 11 }; // Used by moc, qmetaobjectbuilder and qdbus
|
||||
enum { IntsPerMethod = QMetaMethod::Data::Size };
|
||||
enum { IntsPerEnum = QMetaEnum::Data::Size };
|
||||
enum { IntsPerProperty = QMetaProperty::Data::Size };
|
||||
|
@ -1167,7 +1167,7 @@ static int buildMetaObject(QMetaObjectBuilderPrivate *d, char *buf,
|
||||
- int(d->methods.size()) // return "parameters" don't have names
|
||||
- int(d->constructors.size()); // "this" parameters don't have names
|
||||
if constexpr (mode == Construct) {
|
||||
static_assert(QMetaObjectPrivate::OutputRevision == 10, "QMetaObjectBuilder should generate the same version as moc");
|
||||
static_assert(QMetaObjectPrivate::OutputRevision == 11, "QMetaObjectBuilder should generate the same version as moc");
|
||||
pmeta->revision = QMetaObjectPrivate::OutputRevision;
|
||||
pmeta->flags = d->flags.toInt();
|
||||
pmeta->className = 0; // Class name is always the first string.
|
||||
|
@ -391,7 +391,7 @@ void QDBusMetaObjectGenerator::write(QDBusMetaObject *obj)
|
||||
- methods.count(); // ditto
|
||||
|
||||
QDBusMetaObjectPrivate *header = reinterpret_cast<QDBusMetaObjectPrivate *>(idata.data());
|
||||
static_assert(QMetaObjectPrivate::OutputRevision == 10, "QtDBus meta-object generator should generate the same version as moc");
|
||||
static_assert(QMetaObjectPrivate::OutputRevision == 11, "QtDBus meta-object generator should generate the same version as moc");
|
||||
header->revision = QMetaObjectPrivate::OutputRevision;
|
||||
header->className = 0;
|
||||
header->classInfoCount = 0;
|
||||
@ -486,7 +486,7 @@ void QDBusMetaObjectGenerator::write(QDBusMetaObject *obj)
|
||||
typeInfo = IsUnresolvedType | strings.enter(typeName);
|
||||
else
|
||||
typeInfo = type;
|
||||
metaTypes[currentMethodMetaTypeOffset++] = QMetaType (type);
|
||||
metaTypes[currentMethodMetaTypeOffset++] = QMetaType(type);
|
||||
idata[parametersOffset++] = typeInfo;
|
||||
}
|
||||
// Parameter names
|
||||
|
Loading…
Reference in New Issue
Block a user