Namely, they shouldn't be supported. Even trying to create such a type
(as in QMetaType::fromType<int &>()) should fail, because for the
purposes of the meta type, they are not the same.
However, they were being registered in the meta objects' meta type list
as a mistake since commit cb43aaca11
("Introduce QMetaObject::metaType"), including for output parameters in
D-Bus remote objects' meta objects. despite the comment saying "type id
not available".
[ChangeLog][Potentially Source-incompatible Changes] Made meta types for
non-const references fail to compile. Previously, QMetaType::fromType
allowed this to compile, but returned the meta type for the base type,
which was incorrect. Const references are understood to be the same as
the base type.
[ChangeLog][Important Behavior Changes] The meta type for non-const
reference parameters in extracted methods (signals, slots, etc.) is no
longer available in QMetaMethod. This used to be the case in Qt 4.x and
5.x, but due to a mistake in Qt 6.0-6.3, QMetaMethod would incorrectly
report the base (non-reference) type. Additionally, both the reference
and the non-reference types may have been reported in different APIs.
Pick-to: 6.4
Change-Id: I36b24183fbd041179f2ffffd1702384d2b64a5f9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>