71897 Commits

Author SHA1 Message Date
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
Laszlo Agocs
e39fa57f6b Revert "rhi: gl: Maintain Qt 5 compat wrt disk cache behavior"
This reverts commit 38279dea558b06cef6c1d345962df3063fd12c5b.

Causes endless complaints about old GPUs (e.g. PowerVR) on Android and
embedded Linux.

Qt 6.8.2 restored the Qt 5 behavior of writing program binaries to files
every time a GL shader program is linked. That is in addition to the Qt
6 pipeline cache, which writes out all collected program binaries once
in one go, when the QQuickWindow is closing.

The Qt 6 abstractions are modeled after the VkPipelineCache-style
system, meaning no way to query and write out individual
program/pipleline binaries, just an ever-growing blob containing
everything encountered so far, which we then want to do rarely due to
the potential cost and the size of the blob, so e.g. when the Quick
scene is shutting down.

Before 6.8.2, Qt 6 did the logical thing and disabled the Qt 5 legacy GL
disk cache code path, since we do not need two caches concurrently. From
6.8.2 on, when running with OpenGL, there are now two parallel disk
caches. Because the Qt 5 style one works even if the application is
killed. Which is unexpectedly common on mobile/embedded.

Pick-to: 6.8
Fixes: QTBUG-133904
Fixes: QTBUG-134245
Fixes: QTBUG-134089
Fixes: QTBUG-135411
Fixes: QTBUG-134496
Fixes: QTBUG-135810
Change-Id: Icbd880898941195fcbc2da544e1599867c6d5f51
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit a589ef5cff160701316b3eebf2139ea9b55b0de5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit cdb2b134bc3cd45ae164ae6ee310ece6c1f339f8)
2025-06-06 18:18:40 +00:00
Alexandru Croitor
897ebf2d67 CMake: Make qt-cmake-standalone-tests work from prefix build dir
We didn't copy the standalone test template files into the build dir
when configuring a prefix build.

We also need to copy the mkspecs.

Pick-to: 6.8
Change-Id: I517165b2b8db84b0766935e3d535a7a1ef2b6ad9
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 587649deb7188d6944c31d991d0fd2a71f17ab4e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 20dfcf4c59becea25d62121f617d7aacf099fc76)
2025-06-06 18:18:40 +00:00
Eskil Abrahamsen Blomfeldt
0e371a39ea Add an envvar restoring Qt 5 behavior for vertical font metrics
As a last resort for users who have existing Qt 5 applications and
see differences in line metrics when porting to Qt 6, we introduce
an environment variable which lets them restore the old behavior
as a last resort.

This is primarily meant as a porting tool, since we do have other
tools, such as QFont::PreferTypoLineMetrics to work around issues
with fonts that by mistake do not explicitly set the
use-typo-metrics flag even if these are valid.

Pick-to: 6.8
Fixes: QTBUG-134602
Change-Id: Id1d7829888d55247d2f07ee0a49b91ff34f26889
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 9a950b1ecb901cc885995d128768cc04cb55cfb1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 488e21860409b1f09b187c94e6e318f4ff8ff0a7)
2025-06-06 06:35:21 +00:00
Volker Hilsheimer
df7d38d7e1 QTreeView: Delay reset of accessibility when laying out items lazily
QTreeViewPrivate::doItemsLayout might get triggered when accessibility
elements query properties of items, such as the state or geometry. If we
reset the model immediately, then the items that are currently querying
might get destroyed, resulting in crashes.

Instead, use a queued invocation to reset the model only once control
returned to the event queue. This leaves current elements intact.

Amends 6a4afebc5ce8db69a6c9fb398cada31e6bad5e3c and follow-up commit
a86321cb665b1af03b245b3b0fe0b57faa4a678f.

Pick-to: 6.8
Fixes: QTBUG-136074
Task-number: QTBUG-133855
Change-Id: I2c6acda3b31105447393a6efcb85ddf737161fe8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 9b9511c3548c43ce30117edb800af0c824fae26e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit e40d85403ff72921e3f68edd73def85547c98cd7)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2025-06-06 02:13:42 +00:00
Oliver Eftevaag
755e6e6a6d Windowsvista style: Fix hover widget attribute when using contrast theme
The windows vista style sets the widget attribute for certain widgets to
have the Qt::WA_Hover attribute, which makes the widget eligible for
receiving hover events from QApplication::notify(QObject*, QEvent*).

However, if the windows system had enabled a high contrast theme,
the QWindowsVistaStyle::polish(QWidget*) function would return early,
without making any widgets eligible for receiving hover events.

Fix the issue by enabling hover events for select controls first,
before potentially returning early due to using a contrast theme.

Pick-to: 6.8
Change-Id: I5562f46385c6f1b498bc659c65e501f9e9376db3
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
(cherry picked from commit 4720b592d729982faf85093b7511457b4945cf8d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 6874de0e509b59acafe8ff9b67bb3aa7ab4756fc)
2025-06-05 09:19:52 +00:00
Christian Ehrlicher
e2bfcd58ef StyleSheetStyle: Don't paint CE_ComboBoxLabel when no stylesheet is set
Don't paint through stylesheet code when a combobox label has no
stylesheet set at all.
This should be done also for others but may break existing painting
stuff so only fix this here as it's a regression from
a77a7c157d5cdcc88bf0a02caed2aa5ff8850d06.

Pick-to: 6.8
Task-number: QTBUG-131761
Fixes: QTBUG-137108
Change-Id: I462ba198821692aa60e6869df9c8e92332422c44
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit db07a0387497cc56d4c3a82bbbc2150ec19d2e96)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit eae538fa065ea3b3175f593bd37a9f420ee8727f)
2025-06-05 04:15:27 +00:00
Alexandru Croitor
adeb6090a0 CMake: Fix location of iOS framework prl files
iOS prl files for static frameworks were previously placed at a path
like
  6.8.3/ios/lib/QtCore.framework/Versions/A/Resources/QtCore.prl

This caused qmake to silently fail to find iOS framework prl files.
The failure could only be seen when calling qmake with -d -d:

  DEBUG 2: QMakeMetaInfo: Cannot find info file for
    6.8.3/ios/lib/QtCore.framework/Resources/QtCore.prl

This in turn can lead to various build failures if a different non-iOS
prl file is found in a system path.

Place the prl file into the root of each framework, e.g. at
  6.8.3/ios/lib/QtCore.framework/QtCore.prl

We didn't have this issue in 6.7 and earlier, because by default iOS
was built with static libraries rather than static frameworks.

Amends 291817b0bf3f351843b0c1d0de237dc8df5c0fa5

Pick-to: 6.8
Fixes: QTBUG-137297
Change-Id: Idff8e808e9bfc009f82d2a59e5e6752ed8a55714
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 89e7facc2e3095684e64f16103cfce017235e504)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit d12cdac9bd2e7694da598f20ebf566a439f1aaaa)
2025-06-05 04:15:26 +00:00
Axel Spoerl
2c686e47b7 QCocoaMenu: Explicitly remove NSMenu from supermenu on destruction
The d'tor of QCocoaMenu calls dismiss() to remove the current menu.
dismiss() calls cancelTracking, which doesn't always remove the
menu from its parent.

Remove the menu from its parent in addition.

Fixes: QTBUG-135634
Pick-to: 6.8 6.5
Change-Id: Ic8e9b4172c3b2035b7e9ad1b576725923987abf2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 36ebec92e81fb8ee7d965ad1a84221d6c779f562)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 641422686dc82627af829a405c4af570d78ab8cc)
2025-06-05 04:15:25 +00:00
Tor Arne Vestbø
de480b0ed8 Document QT_WARN_DEPRECATED_UP_TO
The default value is 0x070000, via qtdeprecationdefinitions.h

Pick-to: 6.8
Change-Id: I78586231e123321a11d41ec8c1324ab928e5fdc8
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 4d4843df42007cac645ac2ec0caa83602da49a0c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 43d8bf3c28d009caa99591ddb4b4c5f1fc864b10)
2025-06-05 04:15:23 +00:00
Eskil Abrahamsen Blomfeldt
fcf8c2c431 Revert "dwrite: Support additional font names for system fonts"
This reverts commit 6854ea63365ae419a04a470eb17e5f7662f00931.

This caused errors in a Qt Declarative test. It's possible the test
is depending on assumptions that are not strictly true (such as
QFontDatabase::styles() never returning an empty list), but it's
a surprising side effect and should be investigated. So we revert
until it can be addressed.

Pick-to: 6.8
Fixes: QTBUG-137398
Change-Id: I2e673b316f3d5fc14342b36095f9983ad55ea796
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
(cherry picked from commit 2d82e845ccfcb2b5ae8ef96d79fb32d76dd89b23)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 3915e017e77d5052958c03dc624c439540244de7)
2025-06-05 04:15:22 +00:00
Alexandru Croitor
f09e396732 CMake: Improve Apple SDK name and path reporting
If CMAKE_OSX_SYSROOT or QT_APPLE_SDK was set, we still reported the
default platform sdk path, rather than taking into account the set
value.

Improve the reporting by considering these values.

The implementation is incomplete because we don't handle explicit sdk
paths, but this is not critical for the current use cases, because the
value of the function is only used for reporting purposes.

Amends ab7eb492cba64fe985ea80b2f0be22c1c18f3c5e

Pick-to: 6.8
Change-Id: Ic69aec3641d435736018c96f72ba7f75a0f74508
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 747741119ab5fa0bdcdb923e9088ffe287875ebf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 98ac864cabf6cdbca6691446e8b6fd49659f15d1)
2025-06-05 04:15:21 +00:00
Christian Ehrlicher
f5f66610b3 QHeaderView: remove unused include, add missing include
Remove unused include of qtableview.h in the source - this also fixes
the compilation with feature_tableview = OFF.
Move the missing include of qlist.h into the header.

Change-Id: Ie443cf6f3bf6b76dedc994bf1b8c16daebf9022d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit e0130876ba376faf681b80d4a7dbb20a5e3c3bdb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 03d478d5a9cd4ded7a72057d7070fd047b84c195)
2025-06-05 04:15:19 +00:00
Marc Mutz
6e7db8563b tst_QMetaObject: add more QList/QVector tests
Check that a slot that was declared using QVector ends up stored as,
and can be called with, QList (and QVector).

Also check that the various indexOf*() methods do the QVector</QList<
normalization, even though they're documented to require normalized
input. A subsequent patch will deprecate that behavior, so make sure
we don't break it as we change it.

Amends 1fa31be7ce3a6899f1c1597311d7593648ecd1d8.

Pick-to: 6.8 6.5
Task-number: QTBUG-135572
Change-Id: Id28bf3c4163099f07213bfbf7d296b4fd76b71a5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 5c563a98a5ffe2a72a641bfa9ed30e17ecffd893)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 023e36e0e7d9b46fb683df6039c4552d70eb8995)
2025-06-05 03:12:54 +00:00
Michael Weghorn
3a39afef84 a11y atspi: Set correct child index in children-changed:add event
When sending an object:children-changed:add AT-SPI2 event,
set the actual index of the child instead of always using
the child count of its parent.

If the new child were added at the end, its index would be
"[child count] - 1", but the new child doesn't necessarily
have to have been added at the end.

Therefore, use the actual child index either already used as loop
variable or retrieved via QAccessibleInterface::indexOfChild
instead.

The mismatch could e.g. be demonstrated with a simple pyatspi
script when typing Enter in LibreOffice Writer to create
new paragraphs.

Script:

    #!/usr/bin/python3
    import pyatspi
    def listener(e):
        if not e.host_application.name.startswith('soffice'):
            return
        print(e)
        print(f'index in parent set in event: {e.detail1}')
        print(f'index in parent reported by child: {e.any_data.get_index_in_parent()}')
    pyatspi.Registry.registerEventListener(listener, "object:children-changed:add")
    pyatspi.Registry.start()

Sample output without this commit in place:

    object:children-changed:add(4, 0, [paragraph | ])
            source: [document frame | Untitled 1 - LibreOfficeDev Document]
            host_application: [application | soffice.bin]
            sender: [application | soffice.bin]
    index in parent set in event: 4
    index in parent reported by child: 2

Sample output with this commit in place:

    object:children-changed:add(2, 0, [paragraph | ])
            source: [document frame | Untitled 1 - LibreOfficeDev Document]
            host_application: [application | soffice.bin]
            sender: [application | soffice.bin]
    index in parent set in event: 2
    index in parent reported by child: 2

Pick-to: 6.8
Change-Id: I30316c59f8ad6fd018089a8dca8e7a8d1d92d7ec
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 5e7891f73fb1ba33a08ac9bd3fbcdab01d8a1193)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 33f8d0834320ffed5b5dd60fcc2fcfe378933d29)
2025-06-05 03:12:54 +00:00
Bartlomiej Moskal
9b85022d56 Android: Avoid restarting InputMethodManager during IME batch edits
beginBatchEdit() means the start of a batch of related input operations
from the Input Method Editor. We should not restart input until
endBatchEdit() is called. Restarting it before may cause issue with
inactive InputConnection.

This commit fixes an issue where calling
InputMethodManager.restartInput() during a batch edit (e.g., between
beginBatchEdit and endBatchEdit).

Pick-to: 6.8
Fixes: QTBUG-136229
Change-Id: I408e6dfd8a91f2d0f1dd8c18dc0dcc2d13cc3e38
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit a4850d0e0f42229afe2af10cee5794d0de70416c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit ddd53192d348d2c2751ca3b492bead42619f8200)
2025-06-05 03:12:53 +00:00