Use if constexpr () in public headers


Use if constexpr() for conditions that are constexpr. This
fixes MSVC warning C4127, which is enabled for compiler warning
level 4 (/W4).

While at it, don't narrow down the type from size_t to
quint32.

Pick-to: 6.5 6.6
Change-Id: I95403e5d60173ed48478532dcdcc09ecd666fbe0
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
commit37df21126dcf94bb5aaaa8f1e41cf458630be86d
parent2b5c0a07ca2ec0d5917813092ba0425000b28b93
authorKai Köhne <kai.koehne@qt.io>
committerKai Köhne <kai.koehne@qt.io>
commit timeMon, 17 Jul 2023 12:57:23 +0200