repc: Fix warning in generated code


This ammends acd888220b9d600fe057249d43bd3934ae0cbad5 and adds
the same check to three other methods as well.

Pick-to: 6.2 6.3 6.4
Fixes: QTBUG-97790
Change-Id: Iecad6dbd1b99842a2c8802af2d973f9eb986d81e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
commit288859e96ccc1bc733ebd7924d3ce36f4f01d24f
parent8d3e06d2a0ef7529dcbb8b3f9bf0896f61a3e49e
authorDominik Holland <dominik.holland@qt.io>
committerDominik Holland <dominik.holland@qt.io>
commit timeSat, 27 Aug 2022 17:07:16 +0200