qt5base-lts/tests/auto/corelib
Fabian Kosmale cb43aaca11 Introduce QMetaObject::metaType
This function returns the metatype corresponding to the metaobject, or
an invalid metatype for namespaces.

This works as follows: First we increment the metaobject revision for
new metaobjects. Metaobjects with older revisions are handled by doing a
lookup by name. That fallback is also used for dynamic metaobjects (from
QtDBUS and those created by QMetaObjectBuilder).
For new metaobjects, we store the metatype in its metatype array, behind
the property metatypes. This avoids any changes to the property and
method metatype extraction logic: For properties, the metatype access
does not change, as the new metatype is after their metatypes. For
method metatypes, we already have an indirection layer (using offsets),
so by adjusting those offsets by one, the same logic keeps working.

To distinguish between namespaces and dynamic metaobjects, namespaces
store the metatypeinterface pointer for void in the metatype array,
whereas dynamic metaobjects store a nullptr.

One nice additional benefit is that this simplifies the generator logic
in moc, as the metatype array is now never empty.

Task-number: QTBUG-92077
Change-Id: Id3f920f28553f12032a71a1a87dad29e5374dbe7
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2021-03-25 17:33:07 +01:00
..
animation Port QPauseAnimation to the new property system 2021-01-26 21:47:47 +01:00
global Skip globalstatic threadStressTest on QEMU 2021-03-05 08:09:59 +00:00
io Disable security warnings from MSVC in tests 2021-03-17 17:22:00 +01:00
itemmodels Fix removing columns when QSortFilterProxyModel has not been sorted yet 2021-03-25 11:32:22 +02:00
kernel Introduce QMetaObject::metaType 2021-03-25 17:33:07 +01:00
mimetypes Remove .prev_CMakeLists.txt files 2021-01-12 20:59:13 +01:00
plugin Remove .prev_CMakeLists.txt files 2021-01-12 20:59:13 +01:00
serialization QJsonObject: Fix operator<=() 2021-02-18 11:22:51 +00:00
text macOS: Be honest about the system locale 2021-02-11 15:01:45 +01:00
thread Fix warning about virtual override 2021-03-05 15:51:41 +01:00
time Extend system zone test to check it matches LocalTime 2021-03-18 15:30:48 +01:00
tools Rename QList test to something meaningful 2021-03-18 08:31:38 +01:00
CMakeLists.txt Move QStateMachine from QtCore to QtScxml 2020-08-24 20:10:25 +02:00