QModbusPdu: remove Q_DECLARE_TYPEINFOs


For the nested enums, they're already marked as primitive by the
primary template, by way of being enums.

For the class itself, the class is neither copy- nor movable, so it
shouldn't be marked as trivially relocatable, either. I have a QtCore
change lined up that statically asserts that relocatable types are
actually copyable or movable, and this is holding it up.

It's a public class, though, so we need to be mindful of SC and
BC:

For SC, Q_DECLARE_TYPEINFO never really applied. Yes, you can
construct situations where a user statically asserted that this type
was trivially relocatable, but that's SiC Type A: they just need to
remove the assertion.

For BC, Qt no longer has types that change layout based on QTypeInfo
(hello, Q5List), but user code might, but that's their problem. If
existing code used trivial relocatability (memmove instead of move +
destroy), it can continue to do so, no change there. New code will not
have that optimization, but they're equivalent, as long as relocations
happen atomically in one or the other way. Qt doesn't leak which type
of relocation is chosen between functions (by passing a bool parameter
to a function, e.g.); any use of QTypeInfo is contained within the
function that uses it. If users leak it, that's again their problem.
But we should document it, so:

[ChangeLog][QtSerialBus][Potentially Source-Incompatible
Changes][QModbusPdu] The class and its subclasses are no longer marked
as Q_RELOCATABLE_TYPE.

For the subclasses, if the base class isn't Q_RELOCATABLE_TYPE, they
shouldn't be, either.

Change-Id: I95940b5db978f4f0ab23fda21abfed55d392ea49
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
commit5cf1eb9f33ef3a4de3d48324cd6719e61dafea8c
parent5f7bd78c84a744ec5fe8e0bfb6ef13b643d7b799
authorMarc Mutz <marc.mutz@qt.io>
committerMarc Mutz <marc.mutz@qt.io>
commit timeWed, 18 Oct 2023 15:32:40 +0200