Commit Graph

71663 Commits

Author SHA1 Message Date
Milian Wolff 9cba61e5eb Add explicit test coverage for QTimezone::utc
Basically this should work exactly the same as constructing the
QUtcTimeZonePrivate directly. Follow-up performance optimizations
should not change any of this behavior.

Pick-to: 6.8 6.5 5.15
Change-Id: I2a3e78965f3a553b8b70cb12f7772b9fdfbf7bf7
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 7a79ce13a9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-03-04 01:22:25 +00:00
Marc Mutz 5ad97482a9 QWidget: DRY the ctors, use ctor delegation
Don't repeat the body in the two QWidgets ctors, call one from the
other instead.

This will help fighting Coverity's hallucination that QWidget::data is
used uninitialized, or, after 58b9250aea,
dereferenced while it's still nullptr.

Coverity-Id: 475552
Coverity-Id: 475551
Coverity-Id: 475550
Coverity-Id: 475549
Coverity-Id: 396828
Pick-to: 6.8 6.5
Change-Id: I1f9a8b93871143b420b9c8f247e49d57510a2379
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 6626874286)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-03-04 01:22:24 +00:00
Thiago Macieira de3cf05b77 QUrl: decode square brackets in fromLocalFile()
QUrl has an intentional deviation from RFC 3986 when it comes to those
characters, matching the behavior of major browsers: we distinguish the
forms '[' and ']' from their encoded forms. However, for local files,
they are definitely identical, because there's no such thing as a
percent-encoded file names.

[ChangeLog][QtCore][QUrl] QUrl::fromLocalFile() will now decode the
square bracket characters '[' and ']' to their percent-encoded forms.
This will be visible in calls to toString(), toEncoded(), or the encoded
form of path(). QUrl's comparison operator will consider the old
(created from an encoded URL string) and new forms to be different.

Pick-to: 6.8
Fixes: QTBUG-134073
Change-Id: I9eae083007103e34f73cfffd59a618069eba0e19
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 5e936b60fc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-03-04 01:22:24 +00:00
Christian Ehrlicher 9433e8b68d Style: pass widget to styleHint() where appropriate
QStyle::styleHint() take the QWidget as optional third parameter. Add
this to calls to styleHint() where appropriate.

Task-number: QTBUG-2501
Pick-to: 6.8
Change-Id: I95b85d51ce98540920243b37473b97426eb40ab4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 6f813bcb44)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-03-03 19:10:50 +00:00
Christian Ehrlicher bea6b0e944 Style: pass widget to styleHint() where appropriate
QStyle::styleHint() take the QWidget as optional third parameter. Add
this to calls to styleHint() where appropriate.

Task-number: QTBUG-2501
Pick-to: 6.8
Change-Id: I62aa251f7dd9d78178ea8aefc1e2882d3ac040be
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 5b320c146b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-03-03 19:10:48 +00:00
Thiago Macieira 6deb5098a1 tst_QUrl: improve toNSURL()/toCFURL() tests
This extends the test with a few more rows, and with delimiters that the
Apple APIs seem to encode differently. Rather, it's QUrl that deviates
slightly from the standard: we keep the delimiters unchanged,
regardless, like browsers do.

Task-number: QTBUG-134073
Pick-to: 6.8 6.5
Change-Id: I20a7b66a9959b17597cffffdf3652b9167d00d07
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 31753e722c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-03-03 17:24:57 +00:00
Alexandru Croitor ee8cd91279 CMake: Remove semicolon from SBOM external document references
The external doc references need to be appended as strings, not list
elements, otherwise there will be semicolons in the output SPDX file.

This issue was inherited as-is from the upstream SBOM generation
project.

We are fortunate the json converted files are missing the semicolons
due to implementation specifics.

Pick-to: 6.8
Task-number: QTBUG-122899
Change-Id: I2b91775d59d64709b72ff7130dd4f6b506ef8244
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 94e19f42e8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-03-03 16:31:28 +00:00
Cristian Le 192d87010a Unit test `qt_internal_add_compiler_dependent_flags`
Pick-to: 6.8
Change-Id: I12e476e1d7e36492811d2becf58e13923b443caf
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit e070742ab5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-03-03 15:34:11 +00:00
Cristian Le cdb34e0486 Add `qt_internal_add_compiler_dependent_flags` helper
Helper function that groups together compiler specific options and conditions

Pick-to: 6.8
Change-Id: Ibec52a19852ad528007f50316a52d2f867b5fe37
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 167b38712d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-03-03 15:34:05 +00:00
Konsta Alajärvi 9239e7cdef Unblacklist tst_qrhi renderToTextureArray
Try to unblacklist renderToTextureArray test on android

Fixes: QTQAINFRA-6334
Pick-to: 6.8
Change-Id: I59c914b66645dc30e7f1a34f9aefc7fb66e95a67
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit a34b5d60e0)
2025-03-03 11:45:55 +00:00
Christian Strømme a234b472d7 visionOS: Change how the initial immersion style is set
Set the initial style to be automatic, that's the default. With this
change we also get rid of the warnings shown on application startup
complaining about the application not defining an initial immersion
style:
"Since your app does not define an initial immersion style in its
Application Scene Manifest, the default immersion style will be
applied. This does not match the immersion style defined at runtime
'full'. To make sure your app's state matches its runtime behavior
define an initial immersion style."

Change-Id: I1b8bba5f919b72d4f2507a19a30de49e8bfcd708
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 08146377db)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-03-02 16:15:11 +00:00
Axel Spoerl 8633c8e446 tst_QScroller::overshoot(): improve diagnostic output, blacklist on mac
Test is flaky on macOS.
Use QCOMPARE_LT instead of QVERIFY(a < b).
Blacklist on macOS.

Task-number: QTBUG-134105
Pick-to: 6.8
Change-Id: I8f1274ad67bd9ead392ecd0f9c9b7a01dc3edb1e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 7c7731a822)
2025-03-02 17:15:04 +01:00
Thomas Moerschell ce7cf1a8b1 QScroller: Fix no overshoot behavior
Correct previously mixed up parameters to pushSegment(). stopProgress
can be set to 1 so stopPos is the only terminating condition.

Pick-to: 6.8
Change-Id: If590555ed08170800b67063aa10e853411180aa3
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit 84e09e060b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-03-02 17:15:02 +01:00
Marc Mutz bcdd7c260b Long live \constraints!
We have divergence in the way we document function, operator and
constructor constraints. About half use \note, while the other
doesn't. Some say "if and only if" while others say just "participates
only if".

So add a qdoc macro, \constraints, to semantically mark up these
constraints. It expands to a section titled `Constraints`, and
uses a predefined sentence (prefix) for constraints.

Documentation for constraints is moved to the end of the comment
blocks to separate them from the rest of the text.

Apply them to all the standard-ish constraint documentation blocks
(grepped for "participate"). I didn't look for other, one-off, ways
documentation authors may have documented constraints, but I'm also
not aware of any.

Re-wrap lines only if the result fits into a single line.

As a drive-by, drop additional "if"s, as in "only if X and -if- Y" to
make the texts work with the `Constraints` section.

Fixes: QTBUG-106871
Pick-to: 6.8 6.5
Change-Id: I18c2f9f734474017264e49165389f8c9c7f34030
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit b7a67b46e6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-03-02 07:10:48 +00:00
Andreas Eliasson f87929371a Doc: Improve deprecation description for QApplication::fontMetrics()
Add a link to QFontMetrics, which provides more information about the
differences between QFontMetrics and QFontMetricsF and why the latter
is the preferred choice.

Fixes: QTBUG-127528
Pick-to: 6.8 6.5 6.2
Change-Id: Ib5713a9d39bf312a6eae6b8b1a6d1dc1d47e25be
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit bdf453afd7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-03-02 07:10:47 +00:00
Vladislav Tarakanov 593f69a861 QCupsPrintEnginePrivate: Use "true" for "landscape" option
CUPS treats the "landscape" option as a boolean value
(IPP_TAG_BOOLEAN). In this case, all values ​​other than "true", "on" and
"yes" are considered as false. As a result, using an empty string as the
value for the "landscape" option results in the print area still being
portrait.

Currently, the problem with printing landscape images (png, jpeg, etc.)
in Qt programs (e.g. Okular, Gwenview) occurs on Fedora 41 and other
distributions using cups-filters v2.0+.

The patch adds passing the value "true" instead of an empty string for
the "landscape" option, as CUPS expects for changing the orientation.

Pick-to: 6.8
Change-Id: Ib7ad1e2debcfff10e673757c97ef5614fb59a6ca
Reviewed-by: Albert Astals Cid <aacid@kde.org>
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
(cherry picked from commit a77173486a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-03-02 07:10:47 +00:00
Nicholas Bennett f5de04d9c4 Docs: Create \Q4A macro for "Qt for Android" and replace instances
"Android" is trademarked and needs to be referenced in a certain way.
The following steps were taken:
-Created qdoc macro.
-Updated "Qt Android" and "Qt for Android" to use \Q4A in qdoc files.

The macro will need to be adopted in all documentation projects.

Task-number: QAA-2836
Pick-to: 6.8 6.5
Change-Id: I4b52247a4ed52047242a06404e6d3aa19de9c16c
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 9c6c6d7d38)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-03-02 07:10:47 +00:00
Eskil Abrahamsen Blomfeldt 1a4e2e869f Update Harfbuzz to version 10.3.0
[ChangeLog][Third-Party Code] Upgraded Harfbuzz to version
10.3.0.

Pick-to: 6.8 6.5 5.15
Change-Id: I3a4daaa9c0747c4f4717ac8f0f9e7baf9a9a449e
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 82a3357d00)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-03-02 07:10:47 +00:00
Thiago Macieira 0777144b45 QColorDialogOptions: delete QSettings code and stop saving globally
[ChangeLog][QtGui][QColorDialogOptions] The class no longer
automatically saves settings such as the custom colors to a global
QSettings("QtProject") shared by all applications and no longer restores
custom colors from there. Applications that wish to retain the custom
color settings should use customColors() and setCustomColor() with their
own settings files.

Task-number: QTBUG-133805
Change-Id: I49cd7312054f41ca4cdbfffdcb60d6ea242393fc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 9a753fa656)
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2025-03-02 00:46:01 -03:00
Milian Wolff cc6074c543 Add maybe_unused in benchmark to guard against nodiscard in the future
Requested by Marc Mutz when adding the utc() benchmark.

Pick-to: 6.8 6.5 5.15
Change-Id: I6f97f9e4dab07d10718280b4fb7ac158e42b8d67
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 1f0bcec874)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-03-01 23:45:17 +00:00
Milian Wolff c4618d6020 Add a benchmark for QTimeZone::utc
On my machine this gives me:

```
********* Start testing of tst_QTimeZone *********
Config: Using QtTest library 6.10.0, Qt 6.10.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 14.2.1 20250207), arch unknown
PASS   : tst_QTimeZone::initTestCase()
PASS   : tst_QTimeZone::utc()
RESULT : tst_QTimeZone::utc():
     358.686871 nsecs per iteration (total: 358,686,513, iterations: 999999)
     896.524312 CPU cycles per iteration, 2,5 GHz (total: 896,523,416, iterations: 999999)
     2,227.000427 instructions per iteration, 2,484 instr/cycle (total: 2,226,998,200, iterations: 999999)
     560.000375 branch instructions per iteration, 1,56 G/sec (total: 559,999,815, iterations: 999999)
PASS   : tst_QTimeZone::cleanupTestCase()
Totals: 3 passed, 0 failed, 0 skipped, 0 blacklisted, 374ms
********* Finished testing of tst_QTimeZone *********
```

Profiling shows some quite unexpected code paths that
I will try to optimize in follow-up patches. Note that
this function can be called frequently when deserializing
QDateTime over a QDataStream e.g. - I have stumbled over
it while profiling some KDE PIM code in akonadi.

Pick-to: 6.8 6.5 5.15
Change-Id: I7439df53ae8512c766f63cb4b0d4f33d14aa3a01
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 29c7beac2e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-03-01 23:45:17 +00:00
Marc Mutz 8e2c6a5904 tst_QByteArray: check replace() doesn't replace the terminating \0
It doesn't.

Pick-to: 6.8 6.5 5.15
Change-Id: Ica3fb2b8a65d0f9d14490ecdcce72eba82258916
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit fff6928878)
2025-03-01 21:02:09 +01:00
Marc Mutz c653cf1171 tst_QByteArray: check replace() with empty and null needles and haystacks
Some time ago, we spent a lot of time fine-tuning the behavior of
indexOf() and split() w.r.t. matching of empty needles, or in empty
haystacks. Make sure that (QByteArray) replace() is behaving
consistently.

It isn't. Filed QTBUG-134079 to track the issue.

Pick-to: 6.8 6.5
Task-number: QTBUG-134079
Change-Id: I16af5d2bb5b309a56e81854be434fa9430ae284f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 5fc1e9fa0c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-03-01 20:02:02 +00:00
Alexandru Croitor dcb72b5315 CMake: Add function to set up SBOM generation defaults
Move the setting up of options like QT_GENERATE_SBOM into a separate
function, that can be called by projects other than Qt.

Pick-to: 6.8
Task-number: QTBUG-122899
Change-Id: I337c4e9b0b3154ff97f494887bf88ee01e8ed00c
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit dc5c7f9ead)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-03-01 18:26:19 +00:00
Alexandru Croitor 2769ef7174 CMake: Include license and license file attribution in SBOM comment
Some attribution entries don't have a SPDX license id specified, in
that case it's good to at least include the free-form license name and
file path.

Pick-to: 6.8
Task-number: QTBUG-122899
Change-Id: I75bb5c30645684ea74fe94da92ea30eb29965ad4
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit cf9f09cd60)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-03-01 18:26:16 +00:00
Giuseppe D'Angelo 35c18eba64 QColorTransferGeneric: fix the BT.2100 PQ EOTF
The PQ EOTF formula for BT.2100 [1][2] was incorrect. Fix it; while at
it, rename the variables to match the symbols used in the original
formula.

The inverse EOTF was correct, but also rename the variables there (for
the same reason).

[1] https://www.itu.int/rec/R-REC-BT.2100-2-201807-I/en
[2] https://en.wikipedia.org/wiki/Perceptual_quantizer#Technical_details

Change-Id: I6ce3a609824bee82053a16b3ff3cfc7cb396ce8f
Pick-to: 6.8
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit a7ff4679fa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-03-01 11:57:55 +00:00
Ulf Hermann b9169c1210 QByteArray: Make gcc 12 happy
It somehow concludes that asize may be negative and would then cast to
an obscenely large size_t. This produces the following warning:

.../qbytearray.cpp: In member function ‘replace.constprop.isra’:
.../qbytearray.cpp:2579:23: warning: ‘memcpy’ specified bound between 9223372036854775808 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
 2579 |                 memcpy(d + to, a, asize);
      |                       ^

Check for asize > 0 rather than asize != 0.

Pick-to: 6.8 6.5
Change-Id: I63bccb1bf3ff45d539af4efe6843d2c648d7cb86
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 177cd123d2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-28 23:15:07 +00:00
Eirik Aavitsland 8159f4626b Raster engine: Fix painting of zero length, square cap wide lines
Such lines are rendered by drawing a capless line that is pen-width
long, i.e. a square, to represent the two line caps. However, the line
length offset was added before any transformation, so one could end up
with a long line being rendered if the world transform had a large
scale, say.

Pick-to: 6.8
Change-Id: Idff8a2de54c97e35facc8f4e09c43dfea7397588
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 56de113975)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-28 20:05:00 +00:00
Laszlo Agocs e71708a6e5 rhi: d3d: Fix 3D textures exposed via UAV
The docs for D3D11_TEX3D_UAV do not mention accepting -1 as WSize,
unlike D3D12_TEX3D_UAV. Hence passing in m_depth for D3D11.

Fixes: QTBUG-129300
Pick-to: 6.8
Change-Id: I517d23e076039543361d2bca1b91cddd47abcfaa
Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>
(cherry picked from commit 6f89357f59)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-28 12:12:05 +00:00
Marc Mutz d561d864eb QByteArray::replace(): use std::string instead of QVLA<char>
QVLA preallocates space for 256 entries, and while that should be
enough for most uses, it may be too much in the way of stack usage.

Instead of using a QVLA with a non-standard preallocation, use the
more compact std::string benefitting from its SSO.

Pick-to: 6.8 6.5
Change-Id: Ia22543fb287a1976f316f7a4d27b23a22f511463
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 7c21630ce6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-28 10:50:03 +00:00
Jani Heikkinen b0e9665e7d Revert "Revert "Android: update to Gradle 8.12 and AGP 8.8.0""
This reverts commit 22f33e1bd2.

Reason for revert: Needed provisioning changes are now in

Change-Id: Ibc1d1833942394efec0c24dc7e7a3e6ada5b8eea
Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2025-02-28 10:04:46 +00:00
Alexandru Croitor 37c60080dd CMake: Handle installing files with same name during SBOM generation
It's possible for a project to install a custom file with the same name
into different destination directories, and want to include them in
the SBOM.
Previously this failed at CMake generation time with an error like:

CMake Error: Files to be generated by multiple different commands:
qt_sbom/SPDXRef-PackagedFile-foo-bar.cmake

This happened due to using a non-unique filename for the generated
SBOM building file, as well as the spdx id the file name is based on.

Include a short hash based on the installed relative path of the file
to avoid spdx id clashes, and thus generated file name clashes.

Pick-to: 6.8
Task-number: QTBUG-122899
Change-Id: I4c2ecd4652708504ef299af9b6f53d680d542382
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 9245d0a0f0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-27 19:19:48 +00:00
Alexandru Croitor 5fd8af81ad CMake: Handle DIRECTORIES in SBOM custom file sets
Previously one could only pass an explicit list of FILES to
_qt_internal_sbom_add_files. Add a new DIRECTORIES option, which will
glob the given directory paths, and include the found files in the
SBOM.

Pick-to: 6.8
Task-number: QTBUG-122899
Change-Id: Ia27afa93460d9f2e4462a49e30e4d6338300e8f7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 9db03c9dca)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-27 15:57:45 +00:00
Alexandru Croitor 8a1dcd2bb9 CMake: Extract Qt-specific license concluded handling
Extract the handling of the license concluded expression for Qt
entities into the Qt specific handling file.

Pick-to: 6.8
Task-number: QTBUG-122899
Change-Id: Ib6f9a64f66dae0c971c43e8fffbc54362487b271
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit ba93956be1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-27 15:57:44 +00:00
Alexandru Croitor 1f8a8da7c2 CMake: Unqtify THIRD_PARTY_SOURCES handling for SBOM attributions
Nested SBOM attribution targets were always created with the
QT_THIRD_PARTY_SOURCES type even in user projects.
Set an appropriate type depending on whether we are handling a qt
entity type or not.

Pick-to: 6.8
Task-number: QTBUG-122899
Change-Id: Id8144d1b8093de78f2987a611a6de8e6d4777084
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 0d9106bf76)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-27 15:57:43 +00:00
Alexandru Croitor 68856adf1d CMake: Add a new SBOM entity type: THIRD_PARTY_SOURCES
It mirrors the Qt-specific QT_THIRD_PARTY_SOURCES one, to be used when
creating an SBOM attribution target that references a 3rd party
library's sources, as opposed to a complete 3rd party library.

Pick-to: 6.8
Task-number: QTBUG-122899
Change-Id: I8f7f9f7386ffdc18dd8ae6ee32e39019639f5303
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 8b06d37fb0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-27 15:57:41 +00:00
Alexandru Croitor db7e6d6fed CMake: Remove leftover code after refactoring
The assignment is not used anywhere.

Amends f1ac316191

Pick-to: 6.8
Task-number: QTBUG-122899
Change-Id: I3e6326b2782ab42dee8219353953ee6f4378ccfb
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 17c482d818)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-27 15:57:40 +00:00
Alexandru Croitor 8d8cf0bbfe CMake: Re-order SBOM embedded qt_attribution.json fields
Put the attribution file path and entry first, followed by the id,
and the rest of the fields.

Pick-to: 6.8
Task-number: QTBUG-122899
Change-Id: I478a48980e6207646189d6b80ec57dbc9efb4902
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit a5c7eb97ce)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-27 15:57:38 +00:00
Alexandru Croitor c276fa45dc CMake: Allow creating nested SBOM attribution targets for all entities
Allow creating nested SBOM attribution targets also for non-Qt targets
in user projects. This will allow using qt_attribution.json files in
user projects.

Rename PARENT_TARGET to ATTRIBUTION_PARENT_TARGET to make it clear
what the parent target is for.

Pick-to: 6.8
Task-number: QTBUG-122899
Change-Id: Ia08ee934a9dc03827fcc26d0fc90e072499e8a21
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit a2ddd4fbd8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-27 15:57:37 +00:00
Alexandru Croitor 21c5970da4 CMake: Allow including specific attribution ids in SBOMs
Previously one could attach all attributions from a
qt_attribution.json file to a target, or a specific entry based on a
given numeric index.

This is not always practical, as the index of an entry can change, and
including all entries might be too much.

Allow specifying a list of attribution ids to include in the SBOM.
This will parse all the attribution entries and only include those
that match the given ids.

If a list of ids is provided, and any of them is not found, an error
will be shown.

Pick-to: 6.8
Task-number: QTBUG-122899
Change-Id: I2ca442fe0cd6d18773861f90f32ab7380aaeacdd
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 52045e51e7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-27 15:57:35 +00:00
Alexandru Croitor 1dc3a9cac2 CMake: Sanitize nested SBOM attribution target names
To avoid issues with characters like "/" which might come from
attribution ids.

Pick-to: 6.8
Task-number: QTBUG-122899
Change-Id: I65bec3b301f7fe1008cfd06aba3e1fbbb93f38c3
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 4a0b5661fd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-27 15:57:34 +00:00
Alexandru Croitor 59745fc798 CMake: Remove type restriction on attribution file extra SBOM info
So it can be used in other non-Qt projects.

Pick-to: 6.8
Task-number: QTBUG-122899
Change-Id: I11d81d2c6819906fffbffe81f4db1b7af28cb99b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 6cd7f0c09b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-27 15:57:32 +00:00
Alexandru Croitor bccb4c8328 CMake: Remove type restriction on attribution download location
So it can be read / used in other non-Qt projects. We don't have such
a restriction on other keys read from the qt attribution files.

Pick-to: 6.8
Task-number: QTBUG-122899
Change-Id: I225d83b26c68323761a8b13b3e6442057b5f7c7f
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 422f5d859f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-27 15:57:30 +00:00
Marc Mutz 0e7f52c872 tst_QStringTokenizer: check when the lazy range may be empty
Only when using SkipEmptyParts...

Pick-to: 6.8 6.5
Change-Id: I7dd67b801fa0deaab14eb7bb7e9905f60891ec48
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit cef7892135)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-27 15:11:35 +00:00
Alexei Cazacov 18dd4f9479 Doc: Move 'Classes for string data' topic to Qt Core and add it to TOC
Fixes: QTBUG-133954
Change-Id: If51abefc39eaae29f7d533af2974017793ef9358
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
(cherry picked from commit baeed8e1e7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-27 15:11:33 +00:00
Konsta Alajärvi 31e6f4a2ca Unblacklist tst_qrhi threeDimTexture()
Unblacklist tst_qrhi threeDimTexture() test function, by skipping
it with Android OpenGLES.

Fixes: QTQAINFRA-6333
Pick-to: 6.8
Change-Id: I795dd73fc7b35ab065f206030458088d829be9c8
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit d8f75f34c9)
2025-02-27 09:27:51 +00:00
Sze Howe Koh 206a8fec2c [Doc] QObject: Sync warnings of isSignalConnected() and receivers()
Extends e75c1a00e3 because calling
receivers() in disconnectNotify() can deadlock too.

As a drive-by, some statements are generalized further:
* "expensive initialization" -> "expensive operations" since that is
  what the relevant snippets actually show.
* The potential race condition is not limited to "after this function
  returns and before the signal gets emitted"

Task-number: QTBUG-106025
Change-Id: Iff014706b9e8d8147e3bbb9ac51542197eec5db3
Pick-to: 6.8 6.5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit f5b874fd2d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-27 06:57:25 +00:00
Thiago Macieira 54ef8bf929 Use QThread::isMainThread() in a few places
It's thread-safe, whereas trying to load qApp isn't in Qt 6.x (will be
in 7.0) and dereferencing it to call QObject::thread() will probably
never be. It's also faster, being a single function call instead of two
or three.

This is not an exhaustive search, it's just a few places I found while
searching for QThread::instance().

Pick-to: 6.8
Change-Id: I3b4e1c75bb3966e2cd2dfffd79bfc8a40f6cf40b
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 6fb39ca2cb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-27 06:57:25 +00:00
Ahmad Samir d47af17a0d QDir: improve mkdir/mkpath API docs
Pick-to: 6.8 6.5
Task-number: QTBUG-132633
Change-Id: Iafe4a20bacbbf55d19377e8cd04f940d4f2a66f6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 23981aae0e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-27 01:04:10 +00:00
Rami Potinkara d2f48abeb5 Android: update Android SDK to version 35.0.1
This patch updates the macro AndroidBuildToolsVer to
version 35.0.1.

The version 35.0.1 is used elsewhere, see
b49421a984ac2b203b7995f3787b67184c990089

Amends: 9b475eadfc

Task-number: QTBUG-129462
Pick-to: 6.8 6.5
Change-Id: Ic15e12c563fa3d16315daa13b6f6b6ef19535954
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
(cherry picked from commit 7a7093eb87)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-26 21:27:28 +00:00