moc: rename the "offsetsAndSize" member to "offsetsAndSizes"

It contains more than one size.

Drive-by drop the const from the structure, so it becomes properly
trivial (though there's disagreement, see[1]).

[1] https://conformance.godbolt.org/z/rK1xW669K

Pick-to: 6.2 6.3 6.4
Change-Id: Id0fb9ab0089845ee8843fffd16f9cc69ffd90aa4
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This commit is contained in:
Thiago Macieira 2022-06-18 12:04:53 -07:00 committed by Marc Mutz
parent 1e2d67152f
commit 3cf38290d9

View File

@ -220,7 +220,7 @@ void Generator::generateCode()
//
const int constCharArraySizeLimit = 65535;
fprintf(out, "struct qt_meta_stringdata_%s_t {\n", qualifiedClassNameIdentifier.constData());
fprintf(out, " const uint offsetsAndSize[%d];\n", int(strings.size()*2));
fprintf(out, " uint offsetsAndSizes[%d];\n", int(strings.size() * 2));
{
int stringDataLength = 0;
int stringDataCounter = 0;
@ -523,7 +523,7 @@ void Generator::generateCode()
fprintf(out, " QtPrivate::MetaObjectForType<%s>::value(),\n", purestSuperClass.constData());
else
fprintf(out, " nullptr,\n");
fprintf(out, " qt_meta_stringdata_%s.offsetsAndSize,\n"
fprintf(out, " qt_meta_stringdata_%s.offsetsAndSizes,\n"
" qt_meta_data_%s,\n", qualifiedClassNameIdentifier.constData(),
qualifiedClassNameIdentifier.constData());
if (hasStaticMetaCall)