qt5base-lts/src/dbus
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
..
doc Doc: Change section titles that cause bad links 2021-03-11 15:01:35 +01:00
CMakeLists.txt CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
dbus_minimal_p.h DBus: verify up to date with dbus-1.12.12 2019-02-21 13:25:58 +00:00
LIBDBUS-1-LICENSE.txt Document libdbus-1 code in Qt D-Bus 2018-04-20 06:45:12 +00:00
qdbus_symbols_p.h Fix passing QDBusUnixFileDescriptors over peer-to-peer connections 2020-07-13 20:45:20 +02:00
qdbus_symbols.cpp Another round of replacing 0 with nullptr 2020-10-07 23:02:47 +02:00
qdbusabstractadaptor_p.h Use QList instead of QVector in dbus 2020-06-25 22:31:13 +02:00
qdbusabstractadaptor.cpp Use QMetaType instead of integer based type ids 2020-09-23 19:30:28 +02:00
qdbusabstractadaptor.h Add qtdbusglobal.h and qtdbusglobal_p.h 2016-07-14 06:06:43 +00:00
qdbusabstractinterface_p.h Add qtdbusglobal.h and qtdbusglobal_p.h 2016-07-14 06:06:43 +00:00
qdbusabstractinterface.cpp Use QMetaType instead of integer based type ids 2020-09-23 19:30:28 +02:00
qdbusabstractinterface.h Remove some dead code 2020-09-12 23:36:50 +02:00
qdbusargument_p.h Use QMetaType instead of integer based type ids 2020-09-23 19:30:28 +02:00
qdbusargument.cpp Deprecate QVariant::Type 2020-10-23 09:58:57 +02:00
qdbusargument.h Use QMetaType instead of integer based type ids 2020-09-23 19:30:28 +02:00
qdbusconnection_p.h Use QMetaType instead of integer based type ids 2020-09-23 19:30:28 +02:00
qdbusconnection.cpp Switch Q_DECL_DEPRECATED to use C++14 [[deprecated]] 2020-10-03 00:12:05 +02:00
qdbusconnection.h Switch Q_DECL_DEPRECATED to use C++14 [[deprecated]] 2020-10-03 00:12:05 +02:00
qdbusconnectioninterface.cpp QDBusConnectionInterface: Add activatableServiceNames 2019-07-07 12:16:11 +02:00
qdbusconnectioninterface.h QDBusConnectionInterface: Add activatableServiceNames 2019-07-07 12:16:11 +02:00
qdbusconnectionmanager_p.h MetaObject: Store the QMetaType of the methods 2020-06-02 22:42:15 +02:00
qdbuscontext_p.h Add qtdbusglobal.h and qtdbusglobal_p.h 2016-07-14 06:06:43 +00:00
qdbuscontext.cpp Tidy nullptr usage 2019-12-06 12:13:20 +01:00
qdbuscontext.h Add qtdbusglobal.h and qtdbusglobal_p.h 2016-07-14 06:06:43 +00:00
qdbusdemarshaller.cpp Deprecate QScopedPointer::take() 2020-11-20 14:28:31 +01:00
qdbuserror.cpp qdbuserror: Use qOffsetStringArray instead of script generated code 2018-10-16 18:32:18 +00:00
qdbuserror.h Port some more /*implicit*/-like comments to Q_IMPLICIT 2020-10-16 01:07:31 +02:00
qdbusextratypes.cpp Port users of QDBusAbstractInterface::(async)callWithArgumentList() to new variadic (async)Call() 2019-08-07 20:09:17 +00:00
qdbusextratypes.h Remove dead code 2020-10-12 14:49:50 +02:00
qdbusintegrator_p.h Use QMetaType instead of integer based type ids 2020-09-23 19:30:28 +02:00
qdbusintegrator.cpp Use (new) erase()/erase_if() algorithms 2020-12-05 00:47:44 +01:00
qdbusinterface_p.h Add qtdbusglobal.h and qtdbusglobal_p.h 2016-07-14 06:06:43 +00:00
qdbusinterface.cpp Use QMetaType instead of integer based type ids 2020-09-23 19:30:28 +02:00
qdbusinterface.h Replace Q_NULLPTR with nullptr where possible 2017-09-19 11:53:55 +00:00
qdbusinternalfilters.cpp Use QMetaType instead of integer based type ids 2020-09-23 19:30:28 +02:00
qdbusintrospection_p.h Use QList instead of QVector in dbus 2020-06-25 22:31:13 +02:00
qdbusintrospection.cpp Replace 'an unique' with 'a unique' 2017-10-11 18:44:57 +00:00
qdbusmarshaller.cpp Deprecate QVariant::Type 2020-10-23 09:58:57 +02:00
qdbusmessage_p.h Support interactive authorization flag in DBusMessage 2018-07-10 19:46:40 +00:00
qdbusmessage.cpp Get rid of some #ifdef qt6 2020-09-30 21:15:40 +02:00
qdbusmessage.h Get rid of some #ifdef qt6 2020-09-30 21:15:40 +02:00
qdbusmetaobject_p.h MetaObject: store the QMetaType of the properties 2020-02-25 15:43:15 +01:00
qdbusmetaobject.cpp Introduce QMetaObject::metaType 2021-03-25 17:33:07 +01:00
qdbusmetatype_p.h Use QMetaType instead of integer based type ids 2020-09-23 19:30:28 +02:00
qdbusmetatype.cpp Use QMetaType instead of integer based type ids 2020-09-23 19:30:28 +02:00
qdbusmetatype.h Use QMetaType instead of integer based type ids 2020-09-23 19:30:28 +02:00
qdbusmisc.cpp Use QMetaType instead of integer based type ids 2020-09-23 19:30:28 +02:00
qdbuspendingcall_p.h Use QMetaType instead of integer based type ids 2020-09-23 19:30:28 +02:00
qdbuspendingcall.cpp Fix qdoc warnings in QtDBus 2020-10-21 07:31:26 +02:00
qdbuspendingcall.h Remove remaining Q_DECL_NOEXCEPT/Q_DECL_NOTHROW usage 2019-04-04 18:01:38 +00:00
qdbuspendingreply.cpp Fix qdoc warnings in QtDBus 2020-10-21 07:31:26 +02:00
qdbuspendingreply.h Fix qdoc warnings in QtDBus 2020-10-21 07:31:26 +02:00
qdbusreply.cpp Use QMetaType instead of integer based type ids 2020-09-23 19:30:28 +02:00
qdbusreply.h Remove QVariant(int type, void *data, ...) constructor 2020-08-15 10:56:29 +02:00
qdbusserver.cpp Merge remote-tracking branch 'origin/5.13' into 5.14 2019-09-04 07:03:54 +02:00
qdbusserver.h Replace Q_NULLPTR with nullptr where possible 2017-09-19 11:53:55 +00:00
qdbusservicewatcher.cpp Doc: Add missing brief statements for \property documentation 2020-11-12 06:54:53 +01:00
qdbusservicewatcher.h Replace Q_NULLPTR with nullptr where possible 2017-09-19 11:53:55 +00:00
qdbusthreaddebug_p.h Remove obsolete DBus dispatch lock 2017-11-08 05:38:39 +00:00
qdbusunixfiledescriptor.cpp Tidy nullptr usage 2019-12-06 12:13:20 +01:00
qdbusunixfiledescriptor.h Remove remaining Q_DECL_NOEXCEPT/Q_DECL_NOTHROW usage 2019-04-04 18:01:38 +00:00
qdbusutil_p.h Port dbus from QStringRef to QStringView 2020-06-15 10:44:10 +02:00
qdbusutil.cpp Use QMetaType instead of integer based type ids 2020-09-23 19:30:28 +02:00
qdbusvirtualobject.cpp Updated license headers 2016-01-15 12:25:24 +00:00
qdbusvirtualobject.h Replace Q_NULLPTR with nullptr where possible 2017-09-19 11:53:55 +00:00
qdbusxmlgenerator.cpp Use QMetaType instead of integer based type ids 2020-09-23 19:30:28 +02:00
qdbusxmlparser_p.h qdbusxmlparser: Enabled error output 2016-09-27 15:48:45 +00:00
qdbusxmlparser.cpp Silence bogus whitespace "errors" from the DBus XML parser 2017-01-02 07:56:29 +00:00
Qt6DBusMacros.cmake dbus: Skip AUTOUIC on generated sources 2020-09-21 13:18:24 +02:00
qt_attribution.json Record that we're still up to date with latest dbus 2020-03-16 08:52:10 +01:00
qtdbusglobal_p.h Add qtdbusglobal.h and qtdbusglobal_p.h 2016-07-14 06:06:43 +00:00
qtdbusglobal.h Remove dead code 2020-10-12 14:49:50 +02:00