Initially the git vars were assigned to the parent scope of the _qt_internal_sbom_begin_project function, with the intent to set them in the global scope. But the function was later wrapped in other functions, so the variables stopped being accessible. Instead of playing with recursive PARENT_SCOPEs, save the variables in global properties like we do for other info, and use a new _qt_internal_sbom_get_git_version_vars() function to query the vars in the code that needs them. This fixes generated purls to contain the git version and hashes. Also add a new internal API wrapper macro called qt_internal_sbom_get_git_version_vars to allow calling it in other repos. Pick-to: 6.8 Task-number: QTBUG-122899 Change-Id: I061b34f418c1ecc1c66c8c01ef758d2f40611ede Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 41a92bf6f1486259ef25db775520cba647e1cc15) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
…
…
Description
Languages
C++
84.3%
HTML
4.9%
C
3.9%
CMake
3.6%
Objective-C++
2%
Other
0.8%