fuzzgen: fix module-map, codegen, and target-collision bugs
Found while enabling FEATURE_test_fuzz for qtdeclarative and building
it inside a unified top-level Qt build (multiple submodules'
generated fuzz trees add_subdirectory()'d into the same CMake
project):
- The "core" module-map entry unconditionally resolved to
WebEngineCore. qtdeclarative also has a src/core (the QmlCore QML
plugin), so its classes picked up a bogus Qt6::WebEngineCore link
dependency. Only honor the WebEngineCore mapping when the submodule
being scanned is actually qtwebengine.
- QtMsgType (a global enum from qglobal.h/qlogging.h) was wrongly
qualified as ClassName::QtMsgType, because its second letter is
lowercase and misses the "Q+uppercase = global Qt class" heuristic.
Added it to the known-globals list.
- Pointer-to-nested-struct parameters (e.g.
QSGMaterialShader::GraphicsPipelineState *) produced invalid syntax
("Type *{}") because the nested-struct code path only special-cased
references, not pointers.
- The embedded-mode aggregate target was hardcoded as "fuzz_all",
which collides (CMP0002) when more than one submodule's generated
tree is included into the same top-level build. Qualify it with the
submodule name (fuzz_all_qtbase, fuzz_all_qtdeclarative, ...).
Change-Id: I4b7fd3266ca966e9186e179bfa4b7f7840ac64d0
Reviewed-by: Kwanghyo Park <kwanghyo.park@qt.io>