qt5base-lts/tests/auto/corelib/kernel
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
..
qcoreapplication Remove .prev_CMakeLists.txt files 2021-01-12 20:59:13 +01:00
qdeadlinetimer Remove the qmake project files 2021-01-07 15:32:28 +01:00
qelapsedtimer Remove the qmake project files 2021-01-07 15:32:28 +01:00
qeventdispatcher QEventDispatcher(Win): Always honor interrupted status to avoid races 2021-03-11 12:11:18 +01:00
qeventloop Remove the qmake project files 2021-01-07 15:32:28 +01:00
qjnienvironment Fix registerNativeMethods for good 2021-02-11 14:03:50 +00:00
qjniobject Make QJniObject and QJniEnvironment public API 2021-01-27 17:23:04 +02:00
qmath Add qHypot() to qmath.h, exposing and extending std::hypot() 2021-01-27 15:00:57 +01:00
qmetacontainer Remove the qmake project files 2021-01-07 15:32:28 +01:00
qmetaenum Remove the qmake project files 2021-01-07 15:32:28 +01:00
qmetamethod Remove the qmake project files 2021-01-07 15:32:28 +01:00
qmetaobject Introduce QMetaObject::metaType 2021-03-25 17:33:07 +01:00
qmetaobjectbuilder QMetaObjectBuilder: remove unused serialization code 2021-03-20 10:24:27 +01:00
qmetaproperty Remove the qmake project files 2021-01-07 15:32:28 +01:00
qmetatype QTypeInfo: Handle T::value_type being equal to T 2021-03-25 11:22:29 +01:00
qmimedata Remove the qmake project files 2021-01-07 15:32:28 +01:00
qobject QObject: remove QAbstractDeclarativeData::parentChanged 2021-03-11 14:53:26 +01:00
qpointer Remove the qmake project files 2021-01-07 15:32:28 +01:00
qproperty Remove QObjectCompatProperty::operator= for safer usage 2021-01-29 16:06:19 +01:00
qsharedmemory Remove .prev_CMakeLists.txt files 2021-01-12 20:59:13 +01:00
qsignalblocker Remove the qmake project files 2021-01-07 15:32:28 +01:00
qsignalmapper Remove the qmake project files 2021-01-07 15:32:28 +01:00
qsocketnotifier tst_socketnotifier: Fix timeout of QTcpServer::waitForNewConnection() 2021-01-21 08:53:35 +00:00
qsystemsemaphore Remove the qmake project files 2021-01-07 15:32:28 +01:00
qtimer Fix QTimer::setInterval to remove existing bindings 2021-02-15 13:47:31 +01:00
qtranslator Remove the qmake project files 2021-01-07 15:32:28 +01:00
qvariant QMetaType: Store QMetaObject for pointer to const QObject, too 2021-02-26 09:10:31 +01:00
qwineventnotifier Remove the qmake project files 2021-01-07 15:32:28 +01:00
CMakeLists.txt Make QJniObject and QJniEnvironment public API 2021-01-27 17:23:04 +02:00