Commit Graph

16 Commits

Author SHA1 Message Date
Tim Blechmann 06464f027a CMake: support reduced relocations for namespaced Qt
The dynlist files passed to the linker have hardcoded function names
that do not take namespacing into account.
We therefore generate the dynlist files at configure time from the qt
namespace.

Task-number: QTBUG-138543
Pick-to: 6.10
Change-Id: Ib3521b83942548cb09c11687e1701c2308f9d148
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-08-14 05:52:37 +08:00
Kai Köhne 2dda248c08 Fix typo in licenseRule.json
Fixes: QTBUG-138168
Pick-to: 6.9 6.10
Change-Id: I083ffa7f4453731ee2dfffc3ae72ceeefd984841
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2025-07-04 16:43:53 +02:00
Tim Blechmann 6f319847d0 Add q23::expected as a private type
This patch adds a std::expected-like type in Qt for use in the Qt
implementation. It is using Sy Brand's tl::expected which is similar to
std::expected, and works with C++17. Although it closely resembles
std::expected, it is not identical and is therefor added as a private
header. The new type is intended to be accessible to all Qt modules and
is therefore made available through Qt Core. It is, however, not
intended for use in public APIs.

[ChangeLog][Third-Party Code] Added Sy Brand's tl::expected as a third
party dependency for use internally in Qt implementation.

Change-Id: I09930f31bf97498643d62814c688f288d5c33265
Reviewed-by: Tim Blechmann <tim.blechmann@qt.io>
2025-05-25 23:09:56 +02:00
Lucie Gérard e70d7e611e Update licensing of files with infrastructure type
A QUIP 18[1] update sets git files, REUSE.toml and licenseRule.json
as infrastructure type files. They are licensed with:
LicenseRef-Qt-Commercial OR BSD-3-Clause

[1]: https://contribute.qt-project.org/quips/18

Pick-to: 6.9 6.8
Change-Id: Ia7b9ae097ff80bd184256e0b7efa0dd7cfa63def
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2025-03-12 16:04:26 +01:00
Lucie Gérard e5fab54e54 Correct doc/images licensing
Pick-to: 6.9 6.8
Change-Id: I202366f8294920fa4ac15f95a4352d5c56c1a6cd
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2025-02-18 13:58:26 +01:00
Lucie Gérard 7cb90e1563 Make module ready for source SBOM checking
This includes:
- turning VERIFY_SOURCE_SBOM ON
- adding exception to the licenseRule.json files
- correcting the licensing given via REUSE.toml files
- renaming license files not located in LICENSES folder.
They need to be named LICENSE. to be ignored by reuse and
excluded from the source SBOM. The name are updated in the
corresponding qt_attribution.json

A lot of files are skipped during the license test,
but all are present in the source SBOM.
This is why  correction are needed before turning the
source SBOM check on.

[ChangeLog][Third-Party Code] Renaming the license files with prefix
LICENSE. to have them ignored by reuse tool.

Task-number: QTBUG-131434
Pick-to: 6.9
Change-Id: Iab517215bb10a17357d2d2436bba8d3af76e5cd1
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2025-01-27 12:39:22 +01:00
Alexandru Croitor 27d2b54b5d CMake: Split SBOM implementation into separate files
The SBOM implementation got somewhat large. Split the code into
several new QtPublicSbomFooHelpers.cmake files, to make it more
manageable.

No code or behavior was changed.

Pick-to: 6.8 6.9
Task-number: QTBUG-122899
Change-Id: Ia0ca1792eec21d12c4bb4cabe63279e1f5c07e3d
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-01-10 18:42:22 +01:00
Edward Welbourne 00644f4b6d Include relevant Unicode Inc. copyright line in generated data files
This amends commit 880d1aef99 and
extends it to cover the testlocales program under util/.

Pick-to: 6.8 6.7 6.5
Task-number: QTBUG-121653
Change-Id: I3efadc69ce08810876f8e20aa4636c7624728153
Reviewed-by: Lucie Gerard <lucie.gerard@qt.io>
2024-08-30 19:58:47 +02:00
Lucie Gérard fffe0021ea Adapt license tag to follow qt_attribution.json
The license and copyright information is documented in a qt_attribution.json
Those files do not follow the QUIP-18 [1] license rules.
An exception is added to licenseRules.json when needed.
The generated file src/gui/text/qfontsubset_agl.cpp is now skipped during license testing.

[1]: https://contribute.qt-project.org/quips/18

Task-number: QTBUG-125569
Change-Id: I937c95cfb097bb8f29ddacdf7c2217cb9d73f83e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-08-13 18:18:44 +02:00
Lucie Gérard 70667f4624 Add exception for build system file licensing
The files are MIT and BSD-3-Clause instead of only BSD-3-Clause
because parts are copied from an upstream source that had them
MIT licensed

Pick-to: 6.8
Task-number: QTBUG-121787
Change-Id: I5598033e71e97e5da807ab14d63755c05f655980
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-08-12 12:10:07 +02:00
Lucie Gérard d0bf0660b1 Update license rule to Unicode-3.0
Also remove the now unused license and update the qt_attribution.json

[ChangeLog][Third-Party Code] UCD-generated data files now come under Unicode-3.0

Change-Id: I133b1f20643e29a412053eb08ae4c250d07c561e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-08-12 12:10:07 +02:00
Lucie Gérard 6b530c0685 Add license exception
This is a follow-up to commit d5e40b5e58

Task-number: QTBUG-121787
Change-Id: I45c8c4b4a0348f46fa546a1fee53ba5196bf7d8a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-04-24 19:02:09 +02:00
Lucie Gérard 47d8c87b75 Add license exception
Pick-to: 6.7
Task-number: QTBUG-121039
Change-Id: I84049920fa38af48a54714d9cd0a8cb940deb066
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-04-22 16:01:02 +02:00
Lucie Gérard eb87f7bcb9 Fix real dot in location keys regular expression
Location keys are meant to be used as regular expression.
The . need to be appear as `\.` in the regular expression.
The JSON parser interprets the `\`, hence the `\\.`.

Pick-to: 6.7
Task-number: QTBUG-121039
Change-Id: Ie3b8fb9686d59db13e5522309adbf3877bd2a3f7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-04-22 16:01:01 +02:00
Lucie Gérard 541a602e1d Correct wording in licenseRule.json
Pick-to: 6.7
Change-Id: I5bb718547a1c853e0f6c12bb8c93f7d874046a48
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-04-10 21:01:06 +02:00
Lucie Gérard d5d1bfd8e8 Add a licenseRule.json file for checking of SPDX license identifiers
The license test in qtqa reads this file
in order to check the validity of the license used.
This file reproduce the QUIP-18 [1] rules, with some exceptions.

Each entry in the file corresponds to a set of licensing rules.

A set of licensing rules can depend on the file ending,
registered in "file_pattern_ending". The last entry in the
file has no "file_pattern_ending", it sets the rules for the
files whose licensing does not depend on their ending.

The license to be used depends on the location
of the file within the Qt module repository.
Let's call this "<true_location>".
The  "<true_location>" can also correspond to a file name,
offering flexibility for exceptions to the rule.
The "<true_location>" are registered in "location".

For each "<true_location>" there is a
"file type" entry and a "spdx" entry.
The "spdx" entry gives the rule:
the expected license tag(s) in SPDX format
for the file ending (if applicable) and "<true_location>".
The "file type" informs on the QUIP-18 type
the tested file corresponds to. It is purely informational
for the reader.

The set of rules are tested in order of appearance
in the json file. For this reason, a more constraining
ending (like "special.txt") needs to appear in
a "file_pattern_ending" located before
the "file_pattern_ending" of a less constraining ending (like ".txt").
Also, a file ending cannot be present in two "file_pattern_ending".

"file_pattern_ending" and "spdx" should list strings.
"<true_location>" can be regular expressions.

During the test the deeper "<true_location>" are
checked first. The order is which they appear in the json file
does not matter.

To test this file, run
QT_MODULE_TO_TEST=../qtbase perl tests/prebuild/license/tst_licenses.pl

[1]: https://contribute.qt-project.org/quips/18

Pick-to: 6.7
Task-number: QTBUG-121039
Change-Id: I720800507622701b80c76e78e68817c6c39c2407
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-03-07 11:08:18 +01:00