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
Change-Id: Iab517215bb10a17357d2d2436bba8d3af76e5cd1
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 7cb90e15631a9e6f12469a7ca8c070781c4aafc2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Also add a comment to publicsuffix-list's entry that the update is
done by a script that should be updated whenever this file's contents
change.
Amends 36dca3c04f759449f74008a3e79021a179b0f35e.
Pick-to: 6.8 6.5
Change-Id: I1a0e51568e6d4300197c09f759ad3d82277a74d1
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit b9f74f9a0b97588fc07d75fa6a427f5c8d6a2c6c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Dynamic linking on WebAssembly involves preloading .so libraries
during startup of application. Normally, those plugin preload
lists are generating manually by user, which can be tedious.
Add a bash script which demonstrates how to call python
programs to generate preload lists.
Change-Id: I0a9869ad0d26606f8b33af2c38248cec3088dd0d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 010ed1788402bf98d9b98500fdb1f61c333cebe5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
New languages added with v46
- Kara-Kalpak
- Swampy Cree
Several new Chinese-language locales have been added, including one
using Latin script, which invalidated some prior QLocale tests, which
have been adjusted to fit.
Some obsolete time-zone identifiers are now treated as deprecated
aliases. These have lost their AnyTerritory association, implying
changes to QTimeZone tests.
Many redundant likely sub-tag rules for unspecified language have been
dropped, in favor of simpler rules.
[ChangeLog][Third-Party Code] Updated CLDR data, used by QLocale, to
v46.
Task-number: QTBUG-130877
Pick-to: 6.8
Change-Id: I92cf210422c7759dd829a7ca2f845d20e263d25b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit e316276b76b9c3768ca4e19a04d03308ef21fe12)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This function is no longer needed after removing the one unnecessary
use for it in qtspeech.
Change-Id: Ia0d061e898aedff0ba6941b678e0ec45a1abe55d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The lack of this was hidden by other rules (redundant with it) until
CLDR v45, but v46 prunes the redundant rules, breaking this. So
include the missing rule and tweak the code that assumed likely
sub-tag rules preserved language, since this one doesn't. Rework the
tail of withLikelySubtagsAdded() to correctly use this rule, now that
we have it. (The prior comment about there being no match-all was
wrong: CLDR did have it, but our data skipped it.) Amended one test
affected by it (when system locale wasn't en_US).
Pick-to: 6.8
Task-number: QTBUG-130877
Change-Id: I2a415b67af4bc8aa6a766bcc1e349ee5bda9f174
Reviewed-by: Mate Barany <mate.barany@qt.io>
Use .size() instead of .length(), and qsizetype instead of int.
Use the deterministic global seed for QHash to reduce variations
between reruns.
Task-number: QTBUG-131842
Change-Id: I95d13840ad1804aba064b1a7e5dada45f4032d1d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Use QMultiHash explicitly, and build list of values in a QSet via the
range constructor.
Task-number: QTBUG-131842
Pick-to: 6.8
Change-Id: I9cbcddeada0bfd88b11515262f5476e5d59e0fad
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The AnyTerritory entries in the zoneDataTable are derived from
territory="ZZ" entries in the upstream CLDR data; the World ones from
territory="001". The latter give the default IANA ID for each MS ID,
the former give an (often legacy) IANA ID for the MS ID, that is not
based on geography. Some of these are being removed at CLDR v46.
The documentation said the ZZ entries have "no known territorial
association", hinting that there may be some (unknown) territorial
association; however, CLDR's inclusion of them is as entries with a
known non-territorial association, so revise the phrasing to reflect
this.
Also document that windowsIdToDefaultIanaId() returns empty when
there is no territory-specific value, and callers can use the
territory-neutral call to get a suitable value in that case. (They
may, however, wish to distinguish this case, to treat it differently,
so I decided not to just return that in place of empty in any case.)
The upstream CLDR tables do have entries for territory 001, so we
should report these if asked for World as territory. Amend the
available zone ID lookup and mapping from MS to IANA functions that
take a territory to duly handle World via the default-data that was
derived from 001 data in CLDR, instead of from the territory-varying
table, from which those were effectively filtered out when generating
the two tables. Update docs to mention this handling of World, for
contrast with that of AnyTerritory.
In the process remove a spurious split-on-space from the MS to default
IANA lookup, asserting there is no space (in a field now stored in the
table for single IANA ID entries, instead of the one for space-joined
lists of them in which it used to be stored, before I noticed it's
always only one ID). There is a matching assertion in the cldr.py code
that extracts the data. Added an assertion to this last, that each
default IANA ID given by CLDR's MS data does in fact also appear as
one of the IANA IDs for at least one territory (potentially ZZ), and
comment in C++ code on why this means we don't need to scan the
windowsDataTable in a few places, where it would just produce
duplicate entries.
[ChangeLog][QtCore][QTimeZone] Corrected handling of QLocale::World
and clarified in docs how QLocale::AnyTerritory is handled when
QTimeZone selects zones by territory.
Pick-to: 6.8
Task-number: QTBUG-130877
Change-Id: I861c777c68b0cb73a194138fe23fbff839df49e6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add a GroupSizes struct and a corresponding query type to
QSystemLocale that would return a struct of form
struct { int first, higher, least; } by consulting suitable
platform-specific APIs.
Fixes: QTBUG-109955
Change-Id: I2deee814f161ac914f810080866eea1cc432acbe
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Although the other parts of the locale-specific data for zone name
L10n were written using safeInTag() I'd foolishly used plain inTag()
for the exemplar city - which, of course, can also contain crazy stuff
and, it turns out, one of them (albeit this may be a CLDR "whoopsie")
does in fact end in a < (in xnr.xml in v46). So use safeInTag()
there as well and be faithful to CLDR (even if this does turn out to
be an error).
Task-number: QTBUG-130877
Change-Id: Idca22ce689cdd2409c50078498a2badfeecd4de2
Reviewed-by: Mate Barany <mate.barany@qt.io>
The change adds CPE and PURL keys to all qt_attribution.json files in
the repo.
In case if no sensible CPE or PURL exists, a "Comment" field is added
with the text "no relevant CPE or PURL found". If only one of them
does not exist, it is written as such in the Comment field.
This allows filtering for files that haven't had the information added
yet vs those that were looked up but no relevant information was
found.
For sources that are not hosted on github, a generic PURL is used with
a download_url fragment pointing either to the exact location where
the sources can be downloaded, or to the homepage of the project.
The generic package name was chosen based on the 'Id' key of the
attribution entry where it was present, and is not authoritative.
For PURL github packages, the 'git tag' name was specified into the
'version' part of the PURL, rather than the 'version number', because
SBOM processing tooling handle that better than the version number.
For example for the freetype package, we specify the string
'VER-2-13-3' rather than the tag name '2.13.3'.
We might revisit this in the future.
[ChangeLog][Third-Party Code] Added PURL and CPE information to the
attribution files of 3rd party sources.
Pick-to: 6.5 6.8
Task-number: QTBUG-122899
Task-number: QTBUG-129602
Change-Id: Iad126242cafc3ea0b678c5c36b26f857039b1dbd
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Also fix the annotation of englishNaming in cldr.py. Spotted it while
annotating __enumTable.
Task-number: QTBUG-129564
Pick-to: 6.8
Change-Id: I93f698b4cf1b5ae90c21fe77330e4f167143a9f3
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Those files are read by reuse to complement or override the copyright
and licensing information found in file.
The use of REUSE.toml files was introduced in REUSE version 3.1.0a1.
This reuse version is compatible with reuse specification
version 3.2 [1].
With this commit's files,
* The SPDX document generated by reuse spdx conforms to SPDX 2.3,
* The reuse lint command reports that the Qt project is reuse compliant.
[1]: https://reuse.software/spec-3.2/
Task-number: QTBUG-124453
Task-number: QTBUG-125211
Pick-to: 6.8
Change-Id: I01023e862607777a5e710669ccd28bbf56091097
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The other methods that open a tag, potentially with attributes, all
now share __attrJoin() as the tool to combine the attributes and the
tag. Do the same in __openTag().
Change-Id: Ib252b5901b9e1459cbb8c5706ff56f1b7b639d3d
Reviewed-by: Mate Barany <mate.barany@qt.io>
This reverts commit f0f89d3c1946fa819c01b28d757ba0a5074dd163.
Reason for revert: Breaks qttools. Installs without consent in user projects.
Fixes: QTBUG-130717
Change-Id: I2a856cc89cc144f9d69c75a396ba9b8fa4fba482
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
These are probably remnants of times forgotten.
Task-number: QTBUG-129564
Pick-to: 6.8
Change-Id: Ic3ec03201758801e341253cd82ab8034f7fde9b7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Add some type annotatons to cldr2qlocalexml.py as well. Based on the
default arguments the constructor of CldrReader was expecting callables
that return None, but in reality we are passing in functions that
return integers.
Task-number: QTBUG-129613
Pick-to: 6.8
Change-Id: I06832240956ea635ca0cc0ec45c466a3b2539ff7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
A missing update of a "last" variable meant the loop inevitably did
nothing useful. Include type-annotation for last, while doing this.
Thankfully the check still doesn't find any duplications, now that
I've fixed it so that actually would, were any present.
Pick-to: 6.8 6.5
Change-Id: I672e6570359a3ff102a364d8af98c5c8c0bdc4d9
Reviewed-by: Mate Barany <mate.barany@qt.io>
Found these while adding type annotations.
Task-number: QTBUG-129566
Pick-to: 6.8
Change-Id: I51c8e5676f958094946c0e6f396b98c083fd9de0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Bulk update to qtwasmserver 0.1.4 (as distributed on pypi)
Removes the usage of the deprecated/removed wrap_socket function.
Fixes: QTBUG-128938
Change-Id: I03262c799b34f2114150949f4a660c50317d44be
Reviewed-by: Lorn Potter <lorn.potter@qt.io>
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Add type annotations to CalendarDataWriter, TestLocaleWriter and
LocaleHeaderWriter.
Task-number: QTBUG-128634
Pick-to: 6.8
Change-Id: I2c9168fda9cb79cbef3e7ef32ec67270ce168a1b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Dynamic linking on WebAssembly involves preloading .so libraries
during startup of application. Normally, those plugin preload
lists are generating manually by user.
Automate this process as part of installation step.
Change-Id: I364ebdb170f9fac53da241c96f601613352972d8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Add some type hints to unicode2hex as well, it is used by
ByteArrayData.
Task-number: QTBUG-128634
Pick-to: 6.8
Change-Id: I86b7ce8567483bf8a4d4db78c9585652526cb90d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Unify generation of the data on enum-related names (and their indices)
with that of the data for the corresponding codes. This produces the
same tables, just in a different order, putting each code table right
after the name table and its indexing.
It'll mean more conflicts on picking future updates back to 6.8 and
before, but those should usually involve regenerating data anyway,
even when they don't get (visible) conflicts, so this'll just
encourage doing that.
As the TODO comment noted, the reason for keeping the table separate
was just that, during a major rewrite of the scripts (most of five
years ago), I wanted to be sure data didn't change. We've stabilised
plenty since then, so it's time to do that clean-up.
Change-Id: I0c3ee9d41d85debdba8b8b2624f137fadb6d8a3f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The lookup into it is done case-insensitively (because user-supplied
names of zones might not have the right case) but I forgot to make the
sorting of the data table case-insensitive in the aliases. Regenerate
data: only the qtimezone*_data_p.h are changed by the reindexing of
zone aliases.
Pick-to: 6.8
Change-Id: Id5e95c245c7ca421a77298f23baefe6b7021a396
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Intel CPUs have had this since 2013 (Ivy Bridge), but some older
Bulldozer AMD CPUs appear to be missing it. This creates a mismatch
between when the __haswell__ macro gets declared in qsimd_p.h and the
runtime check using the CpuArchHaswell value. That in turn creates a
condition where qInitDrawhelperFunctions() in qdrawhelper.cpp leaves the
memfill pointers set to null.
#elif defined(__SSE2__)
# ifndef __haswell__
qt_memfill32 = qt_memfill32_sse2;
qt_memfill64 = qt_memfill64_sse2;
# endif
...
#if defined(QT_COMPILER_SUPPORTS_AVX2)
if (qCpuHasFeature(ArchHaswell)) {
qt_memfill32 = qt_memfill32_avx2;
qt_memfill64 = qt_memfill64_avx2;
It does this so the qt_memfillXX_sse2 functions don't have to be defined
anywhere, so the QtGui build won't carry unnecessary dead code.
This is old code (from Qt 4.x) and several improvements I've made for
QtCore are not applied yet. My work for qSimdDispatcher[1] isn't
complete: it might have avoided this problem here, but it would also
have required major work for the draw helpers to work in the first
place.
[1] https://codereview.qt-project.org/c/qt/qtbase/+/537384
Pick-to: 6.8 6.7 6.5 6.2
Fixes: QTBUG-129193
Change-Id: Ia427a9e502b0fb46b2bdfffda8e2131b7091c9e9
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Apparently there used to be a mechanism where an alias element in a
top-level LDML element could serve to provide a parent locale as its
source attribute. That is long gone and, since at least a decade ago,
alias elements only ever appear in root.xml, with source="locale" and
a path that starts ../ (so is a relative XPath).
Ditch some complications (that I transcribed faithfully five-ish years
ago when transforming the scripts), replacing them with assertions
that check what's now documented in the LDML spec and confirmed by my
own grep-checks in the CLDR data. This incidentally made one prior
(weaker) check redundant, so I've now removed that from the look-up
for the tags that identify a locale. That look-up is only ever
performed after the DOM root nodes it uses have come through the scan
of locale roots that now does the stronger check.
Makes no difference to generated data.
Change-Id: I811ffbef5f5ecb69183d68fa8bda57281f2a579d
Reviewed-by: Mate Barany <mate.barany@qt.io>
Previously it re-ran only the failed tests, if a proper XML logfile was
written. But in case of "crash" caused by the watchdog for
QTEST_FUNCTION_TIMEOUT, the subsequent tests were not included in the
XML logfile, thus those were never run.
Fixes: QTQAINFRA-5226
Change-Id: Ib4f0849fa2511bb34365fd901fd53c5a3e3ab293
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Do not print warning about no errors in logfile, when
a logfile is not expected.
Task-number: QTQAINFRA-5084
Change-Id: I92f94452418738d31936d47362aa6090090af6de
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Since we now have quite a few "special" test wrappers, I took the
opportunity to refactor the code and add a couple of testcases too.
Change-Id: I20e1214351d71c1474be32f03d4218ae6bdd2277
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Toni Saario <toni.saario@qt.io>
On Unix, if target exists and it is a file, rename silently replaces it
if the user has permission. However, on Windows, if the target exists,
FileExistError will be raised.
With replace, if target points to an existing file or empty directory,
it will be unconditionally replaced.
Pick-to: 6.8
Change-Id: I2774152fec78a00c4ca6c9d1b927e503df2f2e84
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Using the default system encoding cldr2qlocalexml.py and
qlocalexml2cpp.py may terminate with encoding errors on Windows.
Warn the user to set the PYTHONUTF8 environment variable to 1 before
running those scripts to avoid encoding errors.
Pick-to: 6.8
Change-Id: I315a45072cb6ea516d3e9bb7613c6f251792ec59
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The variable ianalist is not really used for anything, it was probably
meant to be ianaList.
Pick-to: 6.8
Change-Id: Ie9f42bf9716da28ee0017319dda96389c415ef4f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This amends commit 880d1aef99a6826c8dd690b13e1ca6ea5574f403 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>