Extract closest point algorithm to fix reuse 6.2.0 license issue


Starting with version 6.0, the 'reuse' source sbom tool scans and
extracts license information from the entire source file contents,
rather than just the first few lines.

For src/runtimerender/rendererimpl/qssgrenderer.cpp, the tool finds
the 'Apache-2.0' license in the middle of the file, which ultimately
breaks source sbom verification, because it expects all qt module
code to be licensed under LicenseRef-Qt-Commercial OR GPL-3.0-only.

Extract the code that has the different license into a separate header
file and mark it with appropriate license information in the header
file, in the qt_attribution.json file and the licenseRule.json file.

This fixes source sbom verification to pass both with the older 5.1.1
version and the newer 6.2.0 version we want to use in the CI.

Amends 5e7c98d74282a8eb410f14159a3a0d86610dd296

Pick-to: 6.12
Task-number: QTBUG-149427
Task-number: QTBUG-140916
Change-Id: I4422df3e279750cf79582d0ddad7e29b27916b2d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
commit35f6b26258ebca5186357d12fe6c63e22b9ca199
parentec416dc505877710b92b15c25ee73d0dfef5270a
authorAlexandru Croitor <alexandru.croitor@qt.io>
committerAlexandru Croitor <alexandru.croitor@qt.io>
commit timeTue, 15 Sep 2026 08:16:38 +0000