fuzzgen: fix codegen for pointer handles and function-pointer aliases


Three categories of type expressions were generating invalid static_cast
calls that fail to compile:

1. GL* pointer handles (GLsync = struct __GLsync*): the GL* path emitted
   static_cast<GLsync>(byte) which is invalid for a pointer typedef.
   Change GL*, Vk*, and the nested-type catch-all to use T{} (zero-init)
   instead.  For integer types T{} = 0, for enums T{} = 0, for pointer
   handles T{} = nullptr — all valid.

2. Nested function-pointer / std::function aliases (e.g.
   QVulkanInstance::DebugFilter = bool (*)(...)):  the catch-all was
   emitting static_cast<ClassName::Alias>(byte) which fails for
   non-castable types.  T{} for a function pointer is the null pointer.

3. Q_ALLCAPS global types (Q_IPV6ADDR = struct { quint8 c[16]; }):
   these types start with Q_ (underscore, not uppercase), so the
   Q+uppercase global-scope guard didn't protect them.  They were
   incorrectly qualified as ClassName::Q_IPV6ADDR.  Add an explicit
   Q_ guard in the value path, ref path, and template-argument path.

Also extend the template-argument qualification guard (for types inside
QList<...> etc.) to exclude GL*, Vk*, Q_*, and kGlobalQtTypes members,
fixing QList<GLuint> being emitted as QList<ClassName::GLuint>.

Change-Id: I934068916c9e3d2414249d175cc3728009a5c3d2
Reviewed-by: Frederic Lefebvre <frederic.lefebvre@qt.io>
commit2fee9b3778030598a2b2c472780c6eada193091f
parentfb32c3e19f675c56860fc4c3d9927ecffe0bef3f
authorAxel Spoerl <axel.spoerl@qt.io>
committerAxel Spoerl <axel.spoerl@qt.io>
commit timeWed, 15 Jul 2026 14:07:29 +0000