Introduce a helper function to silence this lengthy warning, and use
it consistently in all places where the warning was triggered.
Amends 502a7706b9 which introduced the
warning.
Pick-to: 6.5
Change-Id: Ifa5c7e0182a12885af4db42ef5d68b1f27a0c6bc
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit a30289ee0be41e8311aef6d8737885b354a9f047)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 08ef73f94f6428f8cefc0386980b2ba1f63bee84)