fuzzgen: add --qml flag to fuzz QML-exposed private API classes
Qt classes that are exposed to QML often live in private headers
(*_p.h) with a Q_..._EXPORT macro and QML_ELEMENT / QML_NAMED_ELEMENT
/ QML_UNCREATABLE / QML_INTERFACE / QML_ANONYMOUS macros. These were
previously excluded from fuzz generation because the scanner skipped
all _p.h files.
With --qml:
- _p.h files (and files under private/ subdirectories) that contain
any of the QML exposure macros are no longer skipped.
- The stem-prefix matching rule strips the _p suffix before comparing,
so qlottieanimation_p.h correctly matches QLottieAnimation.
- The module is derived from the export macro (Q_LOTTIE_EXPORT ->
Lottie) as a fallback when the source directory name alone gives the
wrong result (e.g. src/qml/ in qtlottie would otherwise resolve to
the Qml module instead of Lottie).
- The generated #include uses the private header form
<QtModule/private/filename_p.h> rather than <ClassName>.
- The generated CMakeLists.txt adds Qt6::ModulePrivate to
find_package and target_link_libraries.
New module map entry: vectorimagehelpers -> LottieVectorImageHelpers.
New modulemap API: findModuleByComponent() for reverse lookup by
component name.
The --qml flag is wired through qt_fuzzgen, qt_fuzz_gen, and qt_tara
(which forwards it to every qt_fuzz_gen subprocess it spawns).
Change-Id: I287cc74dae2dc1fddb1ab44f15722cc3a6f83584
Reviewed-by: Kwanghyo Park <kwanghyo.park@qt.io>