71912 Commits

Author SHA1 Message Date
Marc Mutz
b9a9f4deee QRegion: fix potential UB in QBasicAtomic initialization
Until C++17 (inclusive), a default-constructed std::atomic object can,
officially, only be initialized with a call to std::atomic_init, for
which QBasicAtomic doesn't have API. It is even unclear whether
zero-initialization of static and thread-local objects will cause the
object to be initialized.

QRegion is using QtPrivate::RefCount, but that's just another wrapper
around QBasicAtomic, so it has the same problems: it must always be
initialized.

So don't default-construct and then storeRelaxed() (via
initializeOwned()), use NSDMI with (newly-added)
Q_REFCOUNT_INITIALIZE_OWNED to avoid this dark language corner.

Task-number: QTBUG-137465
Pick-to: 6.8 6.5
Change-Id: I4b765aed329211984c35c40fbc5648bf104990ce
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 5aefe2d9a1d56f6134fcbbdff260c79082eea661)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 2b0ec367c75bc30762ae3482c431311518b35b7b)
2025-06-12 18:59:41 +00:00
Jani Korteniemi
51fbd97bc6 Fix androiddeployqt copying build directory
When project's Android package source directory is set to the
project level (instead of project/android) androiddeployqt keeps
copying the build directory under itself infinitely.

Add check to copyFiles:
-If android source dir is the same as project source dir
-And if current directory copied is in build directory path

Pick-to: 6.8 6.5
Fixes: QTBUG-126743
Change-Id: If45766152c6cbf9e2ee916baa5a15282d3fedaf2
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 3047d6a8a19fed870597d6c482f6c1a826ffb9f2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit ee0cb525cda59bc25b248440225838197a888871)
2025-06-12 18:59:40 +00:00
Olivier De Cannière
778805a66f Widgets: Set viewItemPosition style option for QTableView and QListView
Before this patch, we did not set the view item positions in the views.
This was fine as they were ignored until
b780eaf6a063a7efe03417cf6b7008a188e222a4 added a condition to early exit
on invalid positions. This then broke all qss background styling using
QStyleOptionViewItem::ViewItemPosition as they were always invalid.

Set the position when trying to draw a cell of the view before
reaching the code handling the qss rules for backgrounds.

Fixes: QTBUG-137346
Pick-to: 6.8
Change-Id: I83d7a3ea7b9bab98889791bb807988a74e355b93
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
(cherry picked from commit 5aa1bc46217dc6f53fde8fe17608cf0e5f7a5e78)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit da9ac3bf1d2c2d7259563918f5e665d421957ec5)
2025-06-12 18:59:38 +00:00
David Boddie
d86dc86a93 Doc: Remove redundant "see also" link
Change-Id: Id48d97a171b55f3dbf8d1fa32e23b82d28e5552d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 5b86fca7cf21c79a1ec94dc242290ae23101b67c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 355619c2a3c072c05cae3701c45a132d9b9a3de2)
2025-06-12 18:59:37 +00:00
Edward Welbourne
3cab80ca3a Make QTest::failOnWarning() fail also on any message type >= warning
Particularly for the no-parameter case, which fails on any warning, it
makes no sense to not also fail on a critical.

Change-Id: I36f02a7dfb195616ce68babedbccc61480935fb9
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit 5e9efe45dfe1319b41300b0d3ea7b243ea2c8f73)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 5fc456bfe28c6acadf81397ead7d50598738fad9)
2025-06-12 11:18:21 +00:00
Tor Arne Vestbø
069004fd38 macOS: Explicitly link the platform plugin to Foundation
In the macOS 26 SDK the NSUserActivityTypeBrowsingWeb is claimed to come
from both Foundation (as in earlier SDKS), as well as CoreServices.

However the latter is not the case on macOS 15, resulting into load
errors with missing symbol.

By explicitly linking to Foundation, and putting it first in the
framework list, we trigger the linker to use the right reference
for the symbol.

Reported upstream as FB17876148.

Pick-to: 6.8 6.5
Change-Id: I0c3203f92851ad9fa862aed237823f0e1e28f6ff
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit b9c77b968589fe9fd5c1dbfde60bfa0524a1f24f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 603e0710afbc1914ab6d54f3b885a24458ad364e)
2025-06-12 08:41:54 +00:00
Tor Arne Vestbø
1cf8f9e657 macOS: Remove linkage to AGL framework
It's no longer available on macOS 26, and we don't use it anymore
anyways.

Pick-to: 6.8 6.5
Change-Id: Ia1d0e37dda177f333646e598e517f4af20215dad
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit cdb33c3d5621ce035ad6950c8e2268fe94b73de5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 42b0903c34bd049729f85fcd6236e64f28898b34)
2025-06-12 08:41:54 +00:00
Marc Mutz
a179efefcc tst_QMetaObject: don't compare QByteArray/QLatin1StringView
This isn't needed, and actually counter-productive, because this mix
used to be ambiguous in Qt 6.5.

Amends 5c563a98a5ffe2a72a641bfa9ed30e17ecffd893.

Not picking to 6.5, because the 6.5 cherry-pick of the amended commit
doesn't compile, so the _L1's were already removed as part of manual
conflict resolution.

Pick-to: 6.8
Change-Id: I1810f90c7cf6e3760f1d99e026b291311501c3aa
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit fe7f01019c75fb872a0036e956684d06ca7444db)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 7f2f005d4fb6a08045c7e9f3fd436244d49cc8d3)
2025-06-12 03:54:45 +00:00
Fabian Kosmale
22bd1b2ba9 QSFPM: Support source model undergoing reset during setSourceModel
Since 9d8663c18e88cb0b5a65f86cfd7726f3d31e04d6, we print a warning when
endResetModel is called without beginResetModel.
This however triggers false positives with a QSFPM if we set a source
model which is resetting at this point in time:
The QSFPM reacts to the endResetModel signal in _q_sourceReset by
calling its own endResetModel, but it does not have the resetting flag
set.
Fix this by deferring the endResetModel work that we are doing in
setSourceModel if the source is undergoing reset.

Task-number: QTBUG-132775
Pick-to: 6.8 6.5
Change-Id: I363f2f34a06cc5de031fa87c6274322bf03bd77f
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 3f0261ebe3010f12a887869ff5adf7ad30f5e4c7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 64407cc9ce322017b8435c701265f08bbc1f8d2b)
2025-06-12 03:54:45 +00:00
Mårten Nordheim
8dad81ed5e Schannel: fix verifying intermediate certificates with netscape ext
We were always checking 'client' or 'server' usage depending on our own type,
which breaks for any intermediate certificate with the 'ca' usage set.

We assume that any non-leaf certificate should be a CA (if anything),
and leaf certificates must be for client or server usage.

Pick-to: 6.8 6.5
Fixes: QTBUG-137041
Change-Id: I268f3bad669df77351fc458f56e318db75ecac7b
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit 9ed754e754a8769c6d3a7291dbfe45f38a7dd20a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 1256098113fec2fc0a95dc8a6519208c34eea859)
2025-06-12 03:54:45 +00:00
Volker Hilsheimer
7097e3c690 Test: don't discard result of QFile::open
QVERIFY that the file could be opened, fail the test if it couldn't.

Change-Id: Iab9b819e70b71fade6a58286edff8e022748d9f6
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit 33dc247b6a553a5e4a6038189359d459d9019edf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit e9a941053ff84be7d1fcfb86043d26633883d9f7)
2025-06-12 03:54:45 +00:00
Marc Mutz
3b854dc8d5 QContiguousCache: drag the initialization of atomic ref behind ABI boundary
All callers of QContiguousCache<T>::allocateData() followed the call
with a storeRelaxed(1) to the ref member. So we can just drag that
into the function itself.

Next, it's UB to storeRelaxed() into a default-constructed std::atomic
(and, therefore, into a QBasicAtomicInt), because until C++17
(inclusive) you're supposed to use std::atomic_init to assign the
first (and only the first) value to a default-constructed
std::atomic. QBasicAtomic doesn't have API for that, so you can never
assign anything to a default-constructed QBasicAtomic.

To fix, use placement new to be able to create a QBasicAtomic directly
with an initial value (replacing QBasicAtomic with QAtomic wouldn't
help here, either, since a malloc doesn't run ctors).

A proper fix has to wait until we can depend on C++20's atomic_ref,
which decouples the underlying type from the atomic operations
performed on it, letting us depend on malloc's zero-initialization
of an int member properly initializing it even for a following atomic
operation on it.

Task-number: QTBUG-137465
Pick-to: 6.8 6.5
Change-Id: Ic22d0766bcffb967a86c8ec28b63ee480aebd4a0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 49db71bb1995d8fa71afedb9b461d5203fbe49b1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 32c17c459879aea2aadd77f08f2851c7e73d13a1)
2025-06-11 22:16:11 +00:00
Marc Mutz
e6c5e03d61 QEventLoop: fix potential UB in QBasicAtomic initialization
Until C++17 (inclusive), a default-constructed std::atomic object can,
officially, only be initialized with a call to std::atomic_init, for
which QBasicAtomic doesn't have API. It is even unclear whether
zero-initialization of static and thread-local objects will cause the
object to be initialized.

To fix, port from QBasicAtomic to QAtomic (which initializes to zero).

Task-number: QTBUG-137465
Pick-to: 6.8 6.5
Change-Id: I31a95b36506c376ef0817ef3d61bd8ca02371585
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 8f4ffb72f9e49702f878222b785cf0efc871ee9c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 2d55125018a24a19dc07e317c06179dd083e8694)
2025-06-11 22:16:11 +00:00
Marc Mutz
80aef94a42 [docs] IPC: don't mention undoc'ed QBasicAtomic
Use Q(non-Basic)Atomic instead.

Amends 7a370838177e581c8a9342808ba86e081951a41c.

Task-number: QTBUG-55421
Pick-to: 6.8
Change-Id: Ia8cc059a94acbee667c19b443ed2e2f487b56806
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 0ba05ca500ecb1269b3ba67761e1329e0934f40c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit dbd9f641745f51981b151e5427c30dff3aaa9b90)
2025-06-11 22:16:11 +00:00
Marc Mutz
8848d58f29 tst_QMetaObject: add a reproducer for overly eager QVector/QList replacement
The kludge that was added to argumentTypesFromString() for Qt 6 to
support merging QVector into QList—specifically, the replacement of
QVector< with QList<—was unfortunately not removed before the Qt 6.0
release. As a kludge, it has unintended consequences, as Thiago
pointed out in a comment on a related patch.

This change adds a reproducer that demonstrates cases where the
kludge causes correct code to fail incorrectly. We need this test to
ensure that we do not silently change behavior when deprecating and
eventually removing the kludge.

Adapt the MyQList normalization test, which was carefully written to
avoid hitting the kludge, to use template arguments. This will allow
it to trigger the buggy code path and avoid confusing the reader with
the mention of a non-template MyQList, given that MyQList is now a
template.

Reported-by: Thiago Macieira <thiago.macieira@intel.com>
Pick-to: 6.8 6.5
Task-number: QTBUG-135572
Change-Id: I91d769d494489fe63dbbb67f849b78fc7aa39ec6
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit a97ac8507e39a421f530f5ad612a7e4bb58f6718)
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit fdc070c3b0bce2d7aa5c568cf45555a1697822d7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-06-11 22:16:10 +00:00
Bartlomiej Moskal
b62e1c4794 Android-Keyboard: Improve keyboard visibility tracking
Starting with API level 30, keyboard visibility can be easly checked
using [0]WindowInsets.isVisible(int). This eliminates the need for
relying on callbacks to detect when the keyboard opens or closes.

This commit updates the logic to track keyboard visibility by
observing changes via OnApplyWindowInsetsListener and checking for
visibility changes using the new API.  From now on, for API 30 and
above, the internal keyboard visibility property should no longer be
updated manually.

[0] https://developer.android.com/reference/android/view/WindowInsets#isVisible(int)

Task-number: QTBUG-98984
Pick-to: 6.8
Change-Id: I40f3ccc4e652f1ae0c6c0ebd154d690d1a9d7ca8
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 33cf82c13d6e3e9fc6d15b725f7ebe15be3d4631)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 3f72e55bca1a368d6432c516b5048b4f6f8fc1b9)
2025-06-11 18:12:16 +00:00
Bartlomiej Moskal
2aae64c041 Android-Keyboard: Use new show() / hide() methods for keyboard control
Starting with API level 30, Android introduced new
[0]WindowInsetsController.show(int) and [1]hide(int) methods for
controlling the keyboard visibility. This commit updates the code to use
these methods on devices running API 30 and above.

[0]https://developer.android.com/reference/android/view/WindowInsetsController#show(int)
[1]https://developer.android.com/reference/android/view/WindowInsetsController#hide(int)

Task-number: QTBUG-98984
Pick-to: 6.8
Change-Id: Icfcad3430cd269353572f66f72114238045f7756
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 3823d99a688813d2692eb0d4b99939a65bb6ee6a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 75e575e18f0fbfa8571d9044beea3cf3939881ab)
2025-06-11 18:12:13 +00:00
David Boddie
a72d1c424a Doc: Fix links in see also documentation
Change-Id: Ie2b6964550ea166def27de311c2b948afba5bf04
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 479fb822bf265d45178b7a9bd0bdacb0a02ce88b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 3a5cb14dd375e2d32b191708269f0a476ba6ee7f)
2025-06-11 18:12:06 +00:00
Tor Arne Vestbø
6910ca44cd Add QOperatingSystemVersion/QSysInfo support for macOS 26 (Tahoe)
Pick-to: 6.8 6.5
Change-Id: If6e7ee92e7c491c91a17e2730112319a132ca623
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit f67ef4934b948bbd4d15a2d90ad7172798abb691)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 1c82a674bb0f6ad5e443b27999724a54a3fcab7a)
2025-06-11 18:12:04 +00:00
David Boddie
defdceb00c doc: Fix links and auto-links
Changed function names to include parentheses so that they can be auto-
linked to getters and setters for bindable properties.

Change-Id: I72a06a7def55348bd1295e559751a16c62c93a84
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
(cherry picked from commit d02ac6b3e02d8a5822fc772e456249afaf00dfb3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 57baa91ec2ad0964a9da0f1cf0a7caa9e8536d28)
2025-06-11 18:11:58 +00:00
Bartlomiej Moskal
17228c1edb Android-Keyboard: Avoid manual keyboard visibility updates on API 30+
Keyboard visibility is now tracked via OnApplyWindowInsetsListener,
which provides reliable visibility state changes starting from API
level 30. In this setup, manually updating the visibility property
is unnecessary and may lead to inconsistencies.

Task-number: QTBUG-98984
Pick-to: 6.8
Change-Id: Ife80898e20d4038efeae3438fb89b593bdaa056a
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 21616e1447fb8583d81cb46b34ad25de4bd29d18)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit af519f5d8a93a13b267b0561dac038021d1fc1d5)
2025-06-11 18:11:23 +00:00
Christian Ehrlicher
f79a803044 QPA/Windows: Fix QPainter warnings when animations are disabled
Don't draw on a QImage with a size of 0/0.

This amends 5feefd30734cd12753956819fc7c152be07c24cd

Pick-to: 6.9.1
Fixes: QTBUG-135844
Task-number: QTBUG-127634
Change-Id: Ib57cdccfabe67454984f3229f9d7ad02dd0d9992
Reviewed-by: Błażej Szczygieł <mumei6102@gmail.com>
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
(cherry picked from commit 46c2aa2b617ea136dbd1c9c7606316a10588ef11)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 0ebe6718a1c559c7a8573ca628b07dd97c41ed04)
2025-06-11 18:11:10 +00:00
Christian Ehrlicher
c436e8ec43 SQLite: Update SQLite to v3.50.1
[ChangeLog][Third-Party Code] Updated SQLite to v3.50.1

Pick-to: 6.9.1 6.8 6.5 5.15
Change-Id: I238e95f3e028731aa871e279f21503d39acdbd2d
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit bac0226ac355be25d5670d9a1b0c410c7a5ec58f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit b6a3f29c1014286a612dc3754eb174eda1d91fc8)
2025-06-11 18:11:09 +00:00
Laszlo Agocs
3a980cfd94 rhi: metal: Handle MSAA backing textures like other textures
...when it comes to dropping them in the swapchain's createOrResize().

There is no wait for command completion normally, unless the
code path that calls destroy() is hit. Therefore, handling msaaTex
like the textures behind any normal QRhiTexture is important. Use the
deferred release mechanism that QRhiTexture's destroy() would use on its
backing textures.

This avoids the occasional validation message when resizing Qt Quick
windows that have both multisampling and Metal validation enabled.

Task-number: QTBUG-112355
Pick-to: 6.8
Change-Id: I34549ce47e675d5869239b9330a166b80b40b30d
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit 97fe141f25655d2debd9f3f9ca278aaa759f15e0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit d7b80c9c9bb09e6c51301318d192f054f5b1d70e)
2025-06-11 13:00:44 +00:00
Mårten Nordheim
1fe3a3c059 Http2: Explicitly send RST_STREAM on cancelled request
It will do this when it gets deleted, but due to deleteLater just adding
an event to the event queue the events that are ahead in the queue may
use the stream in question. This would lead to a variant of
'stream not found', or specifically in the case of the bugreport, a
'HEADERS on non-existent stream' stream error.

Amends 6b4e11e63ead46dde5c1002c123ca964bb6aa342

Fixes: QTBUG-137427
Change-Id: I5f2b2d5660866f1ad12aaafbb4e572b08ed5a6e4
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 904aec2f372e2981af19bf762583a0ef42ec6bb9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit a0ab39b24b763d8d44badf2512a859e3d6351cc3)
2025-06-11 06:46:00 +00:00
Mårten Nordheim
eb6fd1d74b Http2: fix handling incoming frames on locally reset stream
After some of the RST stream handling was updated to more closely
follow the RFC it was accidentally not updating the handleHEADERS
function, and the handleDATA function was handled incorrectly leading
to a potential nullptr dereference.

Amends d17d260948e16549d82f1fdd4dec98d246b0622e.

Change-Id: I345448efd7da92f4f74033b03a5c040b5db9d271
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 8d5db24c14d5c7ea8a2abf55e4fd88472dd9ca8b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 4235f0587b144ef90e4736861b4b25371efc49b9)
2025-06-11 06:45:53 +00:00
Assam Boudjelthia
ff2d641875 Revert "Android: qtbase/src/android/. ./QtAndroidBinder.java security sensitive"
This reverts commit 7796ad3face5246ad62a959b61fdd3a92cea2803.

Reason for revert: the code is not doing critical data parsing.

Pick-to: 6.8
Change-Id: Ic07b98c3866b65d0575e29abe97ca6b284c981bb
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 2b4effeec8e3c347e1bab01f3635fb6c71a7521d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 1e3eb1203abc8215ae5e1f4c045b29ef351838a2)
2025-06-09 22:20:56 +00:00
Kai Köhne
3749e01d19 Doc: Fix broken links in Qt Widgets
The iQRhiWidget API got changed in commits acebb97b5880,  acebb97b58807d1d591.

Pick-to: 6.8
Change-Id: I7791b1a61d94f33ba01cfe22e63ecfdc7b81022b
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 95229bb7d039bb9e16a2ffd126d7ff1e25b37d32)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 3bd9eeda59ca2ede1b08165c2e62e5588db156dc)
2025-06-09 13:09:05 +00:00
Nic Zonta
299000fa42 make all convenience functions in QFileDialog open modal dialogs
most convenience functions in qfiledialog.cpp (e.g. getSaveFileUrl, getOpenFileUrl) open modal dialogs, with the exception of getOpenFileContent and saveFileContent. This makes every function consistently open modal dialogs

Fixes: QTBUG-137329
Change-Id: I48952144ed15596b9acba3230c63cece613fb045
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 25fdc044f58d426c3056409e2883becdc3cf0bd1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit e7a9bb77fe8b0717491480dc2ca976ec3ce9f633)
2025-06-09 13:09:05 +00:00
Christian Ehrlicher
bae157261b SQL/ODBC: fix escaping the username/password
The escaping for '{' was wrong in the previous commit.

Amends 38277a88f1dd69de6e031bc8313c8d5beadf6bd0

Pick-to: 6.8
Task-number: QTBUG-122642
Change-Id: Ia363c76b27e527114769b4a923418cddad5586f1
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit d2cd406b349a7c58c3af953c9c7dbf47137c0c73)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit deda96666d0ebf4b4b903a37555fbb70edc55e52)
2025-06-09 13:09:04 +00:00
Axel Spoerl
4b32de005a QCommandLinkButton: Don't reset icon on change to QStyleSheetStyle
d4c518b210ad56cb51c17e6e1b4a81b0deb7253c has implemented a reset of the
icon on a style change.

This has caused a regression, because it overrode an icon set by a
style sheet.

Do not reset the icon if the new style is a QStyleSheetStyle.

Amdends d4c518b210ad56cb51c17e6e1b4a81b0deb7253c.

Fixes: QTBUG-137011
Pick-to: 6.8
Change-Id: Ib77faa03c867b2660a45bdc3ab94e7d739eed4f8
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 839d569dc27cfa5188db477893899d849ac26ea5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit fcd76f6d2461bea19e18a117056910755e0f7221)
2025-06-08 14:36:08 +00:00
Allan Sandfeld Jensen
7b6fb16c71 SSE2 optimize QColorSpace CLUT
Optimize clamping setup for CLUT lookup.

Change-Id: I35d65fc00efcb96a54518466e1e1de169571b862
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 51d5b9e2580a4f54594f616cf9859af86626c887)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit f417776a3678c47c4f2da4b630ac9a9c96ece138)
2025-06-08 12:04:14 +00:00
Konsta Alajärvi
1e566146ab CRA: Android: Mark qtandroidplatformfiledialoghelper.cpp as security critical
Mark qtandroidplatformfiledialoghelper.cpp as security critical with
"data-parsing" as a reason.

Data parsing in nameFilterExtensions() using QRegularExpression.

Fixes: QTBUG-136820
Task-number: QTBUG-135178
Pick-to: 6.8
Change-Id: I378698327a36496317782d6dc0acd092c19de7ca
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 0a4c11633ba963d8f3a0d64009af0617a3ab3151)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 3df9be0f96aad05a339ae3d0185a0a1ef032f509)
2025-06-08 07:36:56 +00:00
Konsta Alajärvi
93f62bcad3 CRA: Android: Mark QtLoader.java as security critical
Mark QtLoader as critical with "execute-external-code" due to
library loading in:
-loadQtLibraries()
-loadLibraryHelper()
-loadMainLibrary()
-loadLibraries()
QtLoader also parses library paths in:
-parseNativeLibrariesDir()

Fixes: QTBUG-136726
Task-number: QTBUG-135178
Pick-to: 6.8
Change-Id: I58a11fd44ea8159b8399ac7a27fd50eaab8185a6
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit fd52f868accab86f800d632014300aaa4920663a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 8447cd262f996b189fd30650aa1ada0c3609d66c)
2025-06-08 07:36:54 +00:00
Andreas Eliasson
d49b2a7d46 Doc: Add \note to QTest::qWait() to consider QTRY_*() macros instead
There seems to be a case that qWait() is a source of eventual pain.
Add \note to encourage the use of the QTRY_*() macros.

Fixes: QTBUG-136538
Pick-to: 6.8
Change-Id: I52daa8c38a55f8db66d8c941c7cbfff7b7060a5b
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
(cherry picked from commit f27588348bccc0e36236500f2257f8006609318f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 121f5105fd5f4b456a1cbedd378d81f3bc6b5e31)
2025-06-08 07:36:52 +00:00
Tor Arne Vestbø
b630f9fcbf iOS: Report inverted screen orientations via windowScene orientation
In bc014d5fc705e95bb34b7729b2c3bb5f9539d777 we stopped using the device
orientation as source for the QScreen orientation, as the former reports
the orientation independently of any locked orientation, while QScreen
is supposed to reflect the logical window-manager orientation.

However in doing that we lost the inverse orientations, which can be
useful in some cases.

We now use UIWindowScene.interfaceOrientation as input, and fall back
to the primary orientation only if we can't resolve the window scene's
orientation.

Interestingly, for visionOS, UIWindowScene.interfaceOrientation reports
portrait orientation, which should be investigated further, but for now
we trust what the system gives us.

[ChangeLog][iOS] QScreen::orientation() now reflects the inverse
portrait and landscape orientations, as long as system allows
rotating the UI to those orientations.

Fixes: QTBUG-137249
Pick-to: 6.8
Change-Id: I8d20f05e72abcec446fd39342c8632960337943a
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Doris Verria <doris.verria@qt.io>
(cherry picked from commit a8dab6eb652a634393a668ac7127f566ef35f2a2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit b695743b7e60a2da63adc9deabd2a4da08fba477)
2025-06-08 07:36:51 +00:00
David Edmundson
1a29c2b182 QVulkanWindow: Force render on paint event
When a paint event is dispatched from the platform, application code
should redraw contents and submit a frame regardless of whether contents
have changed.

This fixes an issue where the window does not always update after being minimized on wayland, and would also be needed for non-composited X11 when exposure changes.

Pick-to: 6.8
Change-Id: I506872f439e0c16d71ad13def1c8b58a0491dd73
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit d08f1d7dbc7b3fc23b81db1ded3314c1cf0dfeb2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 91225ad81e64094662fc1fd32526f8a6c3dd8728)
2025-06-08 07:36:49 +00:00
Tor Arne Vestbø
e0b196940a iOS: Always update screen properties on status bar orientation change
If we move from landscape to inverse landscape orientation, the window
will not lay out, so we won't hit viewWillLayoutSubviews, but we still
need to reflect the new orientation of the screen.

Task-number: QTBUG-137249
Pick-to: 6.8
Change-Id: I9655052772990ca524c5b94e25b2c58cc058ff67
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit c604f2031a2147f1257f7f19edfb5c2487a379d7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 1d9432cf79df07a47f77596461bd90cbda9f383f)
2025-06-08 07:36:47 +00:00
Cristian Le
c3b8e24a8d Add feature deprecation capability
Emit a warning if `FEATURE_*` variable is set. The "feature" is not
registered as a true feature after deprecation.

Pick-to: 6.8
Change-Id: I715af231c228c73d70b037ee31aa61edcd45c21e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 618053e27907369c92fbf5aac37ced07fb6e16c6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 17c522418466a53b9fb7ea7bc1c8d4aa90692e4f)
2025-06-07 11:21:09 +02:00
Cristian Le
a27a118227 Display feature alias information in configure
Pick-to: 6.8
Change-Id: Ia7d054436ffcca64d6fecd363795e7439694b3f4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 11fab3d1503634b47731d91ab0f7d6064dd49b42)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit de505a9c787fcc55b9269e03f369c51db3f8742b)
2025-06-07 11:21:03 +02:00
Cristian Le
7ce45eb4ac Copy qt_set01 to a central location
Pick-to: 6.8
Change-Id: I05b3ef4d02dd1f8583eea9960c3776409f2f3b2e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 9d78275f229f4ed26817c549bf1d8ef73ce371e3)
2025-06-07 11:20:57 +02:00
Cristian Le
ac5ceb289d Make FEATURE_static and FEATURE_shared aliased features
Fixes: QTBUG-133407
Pick-to: 6.8
Change-Id: Ic17315b0229a829689b77e272cd9bbd331c3b0d7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 2d271835679d1833b3ddd64bb5941bde2c6ad650)
2025-06-07 11:20:52 +02:00
Cristian Le
22d0be510b Allow Feature to be alias of Cache variable
Pick-to: 6.8
Change-Id: I09b65cb038567a9f68a140e53a9e06eb15c8fc13
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit a6140d84697e8076734ac2940bcb82555a16504b)
2025-06-07 11:20:46 +02:00
Cristian Le
f30e1e3eeb Forward other qt_feature options in qt_feature_alias
Pick-to: 6.8
Change-Id: Ic0b7479e071fc17020a04ea48386054f0bbf3151
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit beda9c82492a0818299c1623cadd5a1be53ae897)
2025-06-07 11:20:40 +02:00
Cristian Le
1583078e45 Add NEGATE to qt_feature_alias
Pick-to: 6.8
Change-Id: I9e10618a3bc76d285d7bd59ebbf5bc5e56de62d0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 6a93429fc074e56ffbcabf479d7295df6426dbdf)
2025-06-07 11:20:29 +02:00
Cristian Le
267b1f2532 Add qt_feature_alias
Unlike chaining a feature into its `CONDITION`, it has a guaranteed
one-to-one equivalence with the original target.

- An alias cannot be set if the main feature is already set
- Multiple aliases of a feature cannot be set at the same time

Pick-to: 6.8
Change-Id: I5b17ec3af51761880a7edb0c47ad8144815f1f93
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 4bbd324a0a4a488b9ff4272888cc6b7f516d78ff)
2025-06-07 11:20:21 +02:00
Mårten Nordheim
8591f4f0d6 tst_QHttp2Connection: fix typo of tested variable
Accidentally used clientStream instead of clientStream2.
Test still passes though.

Change-Id: I118f1e429faa0367f0b4d02c74a221027ecb2b4d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 1a870f4bf2efdd0c0dd6f3d7a13edccf8c6701cf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 9ff93f75c06b85408d9132eab0beebdc785085d2)
2025-06-07 02:09:59 +00:00
Marc Mutz
1098bb33b3 tst_QMetaObject: refactor indexOfMethod() test
Removes duplication in preparation of adding more tests.

Pick-to: 6.8 6.5
Task-number: QTBUG-135572
Change-Id: I9ebfc40e24256d2d92af3f593f905d97b273e187
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 687fb924408f2043989b624e658620c59157e15e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit bff88a139179e9fbe2eaf2d65e4b7a87203774de)
2025-06-07 02:09:59 +00:00
Marc Mutz
11f8d52111 QTestResult: remove unused QTestResultPrivate forward declaration
This class was never pimpled in Qt 5.

Amends the start of the public history.

Pick-to: 6.8 6.5
Change-Id: I5761bb0e8401dd654a885b5edcf821be9e4c2694
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit ab7c1386d54732e50c0d9603ae5c013f3da81b12)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit a01e8d0d5c4bd856e1a14af76c0d8bcc5e07095a)
2025-06-07 02:09:59 +00:00
Santhosh Kumar
2dd3637c80 Fix regression in drawing table cell border when border-collapse enabled
The patch 732962d604e7469f9a9f02fe0cd3d1fd04caddb8 enables drawing a
border around cells within the table when set through CSS styling. But
this caused a regression when border-collapse is enabled without setting
the cell border. This patch enables drawing borders for table cells
when either of those conditions is satisfied.

Fixes: QTBUG-136590
Pick-to: 6.8
Change-Id: Ibf43c404439c9fee1cfd2b40789150edb76c6971
Reviewed-by: Nils Jeisecke <nils.jeisecke@saltation.com>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 2e0dc22bdb46f94a516e834ad4fda2b93aada352)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 999dbe5734278cf4df062eea6b640287a4c2f5e7)
2025-06-06 22:43:14 +00:00