Commit Graph

68000 Commits (24f26ca9bbcf72a7e0c8dbd52001540e4f1bd034)

Author SHA1 Message Date
Oliver Wolff 24f26ca9bb windeployqt: Fix typo in mkspec detection
When adding support for ARM64 hosts a typo sneaked into the mkspec
detection. This typo broke deployment for mingw builds.

This patch amends 81984807b3

Pick-to: 6.7
Fixes: QTBUG-126775
Change-Id: I37ee3617dc6b92520250da3ff0665ce06cea1cb8
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
(cherry picked from commit 3b789ed01e1efead3538b7cdc08f456e55f1d882)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-07-03 15:03:12 +00:00
Eirik Aavitsland 95101d4e50 CMake: Make baseline tests standalone projects
Just as was done earlier with the autotests (in commit
8450ab8dec), add the boilerplate
standalone test prelude to each baseline test, so that they can be
opened with an IDE without the qt-cmake-standalone-test script, but
directly with qt-cmake or cmake.

Boilerplate was added using the following scripts:
https://git.qt.io/alcroito/cmake_refactor

Change-Id: Iaf3d490211c5f3404bcc31f4dd0a6c02821f4232
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 5d1ded3359ee8bffa33a4b83d5e72b855d61dcc2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-07-03 11:42:45 +00:00
Volker Hilsheimer f715325932 Document in a test that mixing connect/disconnect syntax doesn't work
We cannot go from member function pointer to method index for slots (we
can for signals), so using string-based syntax to connect and PMF-syntax
to disconnect doesn't work, and vice versa.

Document this in a (partially failing) test, and add a warning to the
relevant QObject::disconnect documentation.

Task-number: QTBUG-126580
Task-number: QTBUG-126581
Change-Id: I4b17662aa9aa7b624049c5b0a3b046ed35230f05
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 27a3229626249a100d8e6fa495927715aba6963d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-07-03 06:02:34 +00:00
Mårten Nordheim 0fb43e4395 HTTP2: Delay any communication until encrypted() can be responded to
We have the encrypted() signal that lets users do extra checks on the
established connection. It is emitted as BlockingQueued, so the HTTP
thread stalls until it is done emitting. Users can potentially call
abort() on the QNetworkReply at that point, which is passed as a Queued
call back to the HTTP thread. That means that any currently queued
signal emission will be processed before the abort() call is processed.

In the case of HTTP2 it is a little special since it is multiplexed and
the code is built to start requests as they are available. This means
that, while the code worked fine for HTTP1, since one connection only
has one request, it is not working for HTTP2, since we try to send more
requests in-between the encrypted() signal and the abort() call.

This patch changes the code to delay any communication until the
encrypted() signal has been emitted and processed, for HTTP2 only.
It's done by adding a few booleans, both to know that we have to return
early and so we can keep track of what events arose and what we need to
resume once enough time has passed that any abort() call must have been
processed.

Fixes: QTBUG-126610
Pick-to: 6.7 6.5 6.2 5.15 5.12
Change-Id: Ic25a600c278203256e35f541026f34a8783235ae
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit b1e75376cc3adfc7da5502a277dfe9711f3e0536)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-07-03 06:02:32 +00:00
Ahmad Samir 4d9bedc97b QString: move empty "before" note to the relevant replace() overloads
Amends 3e56757d651ffcba9ea65aa990b4e02b05e00b17.

Pick-to: 6.7
Change-Id: I91a59a8b9e3abfeb14272554d5ca0833141ff2ee
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit d16f4cf826d25a7fd1e8c617e4cafaf7cc9a2711)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-07-02 19:43:55 +00:00
Jan Moeller 2bc0647805 iOS: Always insert created a11y elements to the cache
By having all known a11y elements in the cache, the iOS Screen Reader will
stay up-to-date with the UI elements that are currently present.
Do ensure this behavior, the ctor is made private.

Fixes: QTBUG-126622
Pick-to: 6.7
Change-Id: I23452ffd60128889a49e5844a6fc17d45683cee5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 9a6c32bed15ed3aa13ff82e15ac6834d6e7bdc3b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-07-02 17:04:15 +00:00
Ivan Solovev 916ce646b7 Rename QIdentityProxyModel::isHandleSourceLayoutChanges()
... to handleSourceLayoutChanges(), as this is more in line with the
Qt naming guidelines.

Amends 675b4f63fe.

Change-Id: Iea515693337b8b5332df192191bd9ec3e6cdd65c
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit ae7a8c84b0c65696ca6eda188bb54a50d8ef6e28)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-07-02 17:03:45 +00:00
Joerg Bornemann 2e58e04c75 CMake: Set CFBundleDevelopmentRegion from QT_I18N_SOURCE_LANGUAGE
The value of QT_I18N_TRANSLATED_LANGUAGES is reflected in generated
Info.plist files. We should do the same for QT_I18N_SOURCE_LANGUAGE.

Pick-to: 6.7
Fixes: QTBUG-126790
Change-Id: Id9d680a183047942585e00f5d8cf1ac3c2352c9f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit ea435bb12766fea1a20cfdf67b8433593d20aeae)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-07-02 17:03:40 +00:00
Liang Qi 38ce3c67be Revert "QGestureManager: use gesture owner target if topLevelAt returns nullptr"
This reverts commit 10c3dd87d3.

QtWidgets depends on the old QApplication::topLevelAt() behavior too
much, especially for the single top level window case. It's not easy
to be decoupled in this way.

Task-number: QTBUG-113404
Task-number: QTBUG-125878
Task-number: QTBUG-126313
Pick-to: 6.7 6.5
Change-Id: Ica9753bfc85f54ef24ff3db12ea954b06b50b1f0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 04b8b61ce56d552c1240a8f5e3f089edc7b56f52)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-07-02 17:03:39 +00:00
Wladimir Leuschner 2a10643d44 QWindows11Style: Change appearance when Button is disabled/hovered
Fixes: QTBUG-126503
Fixes: QTBUG-125781
Pick-to: 6.7
Change-Id: Ib3e1ff2cab2c82c04445d238861766dd93237ce0
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 3aca4589b06c6614538c9d96cd1c38e548499e82)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-07-02 17:03:37 +00:00
Eirik Aavitsland a6e399251a Doc: Add basic info about icon engines to QIcon
Some of the function doc refers to icon engines, but the concept was
never properly introduced. Also explains why order of adding icon
files matter.

Task-number: QTBUG-125772
Change-Id: I342d3d90e3cb58f0c12b205a226aaf78b2136dac
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 17bf4cd98084ff882bdddb1bd55a9ee52613b4bd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-07-02 07:20:13 +00:00
MohammadHossein Qanbari 4b7ad06dc4 Gtk3 Theme: Fix disabled colors for texts
Previously, disabled text colors were a darker version of the normal
text color. However, when the text color is black, the darker version
is also black, making the disabled text indistinguishable from the
enabled text.

To fix this issue, a source struct called `MixSources` has been
implemented. This struct contains the mixing sources. For disabled
texts, a mix of the background and text color sources creates a more
sensible appearance, making the disabled text look more like the
control's background color.

This solution does not require access to the system's color scheme, as
the disabled color depends only on the background and foreground colors.

Fixes: QTBUG-123449
Pick-to: 6.7 6.5
Change-Id: I469e4fc05ddd4851120b89646bd7ab17a3ee2c00
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 21a070052716c8ce1c471817b985f43e5b19af0c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-07-01 23:23:47 +00:00
Jøger Hansegård 267e378d14 Simplify VARIANT handling using a QComVariant RAII wrapper
The QComVariant RAII wrapper automates lifetime management of VARIANT
structures and elements that it contains. For example, it will
call IUnknown::AddRef if a COM interface is assigned to it. It will also
clear all held resources at destruction.

Task-number: QTBUG-126530
Change-Id: I543d236293d25cbc70ff25046e553351eccfb850
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 717580c1985dd0804363bafb8822f82dacfb3f90)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-07-01 23:23:47 +00:00
Jøger Hansegård 51f7513bc0 Replace bStrFromQString with a QBStr RAII wrapper
This makes transfer of ownership explicit. The code is from ActiveQt.
If this patch is accepted, it can be removed from ActiveQt.

Task-number: QTBUG-126530
Change-Id: I613004ba784f87a9b935b2bbaead2205243c3033
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 93686386c078e2be03fb8bc42dee60a9e36fc23f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-07-01 23:23:47 +00:00
Jøger Hansegård f5ff1096ec Use ComPtr smart pointer to make transfer of ownership explicit
With ComPtr, transfer of ownership is explicit in the code because we
see the 'Detach' function being used.

Task-number: QTBUG-126530
Change-Id: I815c22f21b4a9b174d0d49ceb014bbffe41b6e82
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit d7edf2894c94271c3794a85ecf24a24ce92d2fcd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-07-01 23:23:47 +00:00
Jøger Hansegård 89ba182737 Use Microsoft::WRL::ComPtr to manage lifetime of QWindowsUiaMainProvider
Using smart pointers for managing COM object lifetimes reduces risk of
introducing reference counting regressions.

Task-number: QTBUG-126530
Change-Id: If487b78eae6403c762205ecc042e8872e3a6b940
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit f51896b74e57459748313af750c013353d013821)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-07-01 23:23:47 +00:00
Jøger Hansegård 29c32e7cdc Avoid holding static mutex in QWindowsUiaMainProvider::Release
This patch reworks "Fix cache maybe invalid while the signal is actived
from queue" (80f44954f6) and associates
a mutex with the QWindowsUiaProviderCache tables instead of with the
QWindowsUiaMainProvider reference counting. This makes it easier to
switch to using COM smart pointers to manage QWindowsUiaMainProvider
lifetime, where AddRef/Release may be called as part of copying smart
pointer instances.

It is unclear if the QWindowsUiaProviderCache tables can be concurrently
accessed, still this patch maintains a mutex to protect them.

Task-number: QTBUG-106653
Task-number: QTBUG-126530
Change-Id: I2fc3ba6b6666412ebc86461ebc8f008e1fd6a165
Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit caa560931929d544ab816de09ba5f23912585ade)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-07-01 23:23:47 +00:00
Christian Ehrlicher 817404e396 QPA/Windows: Avoid confusing warning about empty QPixmap
A drag'n'drop operation on a screen with a dpr != 1 tries to scale the
(optional) QDrag pixmap. This results in a confusing warning
"QPixmap::scaleWidth: Pixmap is a null pixmap". Avoid it by checking if
there is a pixmap available before trying to scale it.

Fixes: QTBUG-122755
Pick-to: 6.5
Change-Id: I554675b79840e34ddd3f53153b68e913fd333122
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit db328ca975bc63f3baf3d021dcff1ea37fa6b6a0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-07-01 20:55:49 +00:00
Christian Ehrlicher 369290d639 SQL/SQLite: add check for localtime_r/localtime_s
Add a check for localtime_r/localtime_s to avoid the usage of a sqlite
mutex when a time needs to be converted.

Change-Id: I536497da1938131298c1198db85dab74d6157e35
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit bcfa0102e5910d99263ebb73515cc9d35b818b5c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-07-01 20:55:49 +00:00
Tor Arne Vestbø a68f5a12ce Apple: Don't `_debug`-suffix libraries in single config framework builds
As part of fee1518294 we enabled framework
debug builds, which left us with an inconsistent library naming. The
framework libraries are always unsuffixed, e.g. QtGui.framework/QtGui,
while we were adding _debug suffixes to the plugins and static libs.

This was confusing macdeployqt, as it uses simple string matching logic
for "_debug_" to detect that a Qt build is a debug build, and since
the framework library didn't have a suffix it then failed to deploy
the suffixed plugins.

We now follow the requirement from the framework naming and skip the
suffixing for all libraries in this configuration.

Change-Id: I982253fc46c65aa3fab52f8658f62ef63cdac49f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit d3be87ff1d558f05309b1f29f7e71f291498584f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-07-01 20:55:49 +00:00
Tor Arne Vestbø 9758c1556c macOS: Track menu bar clicks for popup closing in QCocoaIntegration
A static member in QCocoaMenuBar relies on the app having at least
one QCocoaMenuBar, and also stays around after the qGuiApp has gone
away, potentially leading to a crash.

As a drive-by, clarify the comment and variable name to point out
that we're closing popups on _any_ native menu opening, not just
menus in the main menu bar (NSApp.mainMenu).

Pick-to: 6.7 6.5
Change-Id: Ib14919e317d70e4c76f3d89c78331edb958bf048
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit daad2b28fdb884e6d796ab024bcb962155cf5534)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-07-01 20:55:48 +00:00
Lena Biliaieva b694c58d5e QHttpHeaderParser: add rvalue-this overload to headers()
Add rvalue-this overload to be called by corresponding
QHttpServerRequest::headers() method.

Task-number: QTBUG-125859
Change-Id: I2b12d2b80614f627c1aca514a10e1e86a2c5b24d
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 5e9212c1069604dd88fef9f0877459abeb87ad27)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-07-01 20:55:48 +00:00
Alexandru Croitor 1c633d68b4 CMake: Add IMPORTED_LINK_DEPENDENT_LIBRARIES for versionless targets
When creating non-aliased versionless targets, make sure we also add
the config-specific IMPORTED_LINK_DEPENDENT_LIBRARIES properties, so
that for older CMake versions, we still get the -rpath-link handling
of the dependent libraries.

Amends 173164cd47

Task-number: QTBUG-126727
Change-Id: I22618a51bd98cc851ec1a01a27086e0b878bee8d
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 16f49f6a1c58919fb15c82d8381d7fc0ff5557ad)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-07-01 20:55:48 +00:00
Alexandru Croitor bc4459ee31 CMake: Write link dependencies into AdditionalTargetInfo.cmake file
When a shared library target has private dependencies to another
shared library, they are exported by CMake into the target's
IMPORTED_LINK_DEPENDENT_LIBRARIES_<CONFIG> property.

This property then is read by the consuming project to determine which
file paths need to be added to the -rpath-link linker option.

Due to the simple logic that CMake uses to process this property,
if the project CMAKE_BUILD_TYPE does not match the _<CONFIG> part of
the property, the dependent libraries will not be added to
-rpath-link, causing link failures.

Make sure we explicitly set all the possible variants of the property
in our custom Qt6FooAdditionalTargetInfo.cmake file, to ensure we
always pick up the relevant dependent libraries for processing.

In conjunction with 173164cd47 and
1c287cea29 in qtbase, this should
hopefully avoid most -rpath-linking issues for QNX and Yocto builds.

Task-number: QTBUG-126727
Change-Id: I16a9cb5553d57e5ea3edc28cc2aab89c77f02a75
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 9fe100e270cb5b60fe5d1100c0b5074226873213)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-07-01 20:55:48 +00:00
MohammadHossein Qanbari 88d8e35ccb Use QFlatMap::operator[] when the reference value is needed
The QGtk3Json::save() function does not save the palettes properly. The
bug was occurring as the QFlatMap::value() method returns a copy of the
value stored in the object.

To fix this bug, the QFlatMap::operator[] operator is used as it returns
a reference to the value. Then the update happens on the original value
in the QFlatMap object.

Pick-to: 6.7 6.5
Change-Id: Ib6f9e350f5447027de4d0a8e6cb8a84012ea8990
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
(cherry picked from commit e17245505ea4ae2bdc05608114586bc5fa933d58)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-07-01 20:55:48 +00:00
Soheil Armin 2aaafce903 Android: Fix duplicate class names when generating QML to Java code
Whe the QT_ANDROID_GENERATE_JAVA_QML_COMPONENTS flag is present the
AndroidDeployQt generates nested classes with the same name as target
and QML module names. When the target name is the same as the QML module
name, the code gets generated successfuly but will fail at compile-time
in the target user project.

With this fix, we detect such cases and fail early, providing a proper
output message

Fixes: QTBUG-125160
Change-Id: I6303d76bc437f7eee806e4429bef81b5fbeb1e27
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit abfeb4542c9107fa40511209d25bc7d0b5db1a8c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-07-01 20:55:48 +00:00
Eirik Aavitsland a721428478 Add a few improvements to the baseline testing framework
1) Add a QBASELINETEST_MAIN macro as a replacement for QTEST_MAIN,
relieving the clients of reproducing the kludgy workaround

2) Add a -server command line option to baseline tests, as an
alternative to specifying the server in an environment variable

3) Fix command line parsing so that it exits on syntax errors.

Change-Id: I36f38267143a308e971e2e7b2fdbe4be44370043
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 1036e9d4f1cbeb7c7e43b65eb1678b76ac4c2f2a)
2024-07-01 20:55:48 +00:00
Tor Arne Vestbø 3cdc9084ba Pass on NSNotification to QMacNotificationObserver callbacks if supported
Change-Id: I167f2e24453a2f2c75b81207f7293c72243f5a7a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit c7c830057589a91cc369375775d018c5057ba46a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-07-01 17:57:47 +00:00
Tor Arne Vestbø 5fc66f68da macOS: Don't try to bring all app windows to front on macOS < 14
Most QWindows are shown in main(), at which point the app is not
active yet. When the app is then activated by the OS only the key
and main window is brought to the front, leaving auxiliary windows
behind other applications. This differs from the behavior of showing
windows once the application is active, in which case all windows
will end up in front of other applications.

To remedy this, we bring all of the app's windows to the front
when the app finishes launching. But the way we do this fails
on macOS < 14 due to a bug in macOS, where the OS will deactivate
the app as part of activating all windows, resulting in losing
the original key (focused) window.

To fix the immediate issue we skip the workaround of bringing
all the app windows to the front on macOS < 14. Longer term
we should consider other methods to bring all the windows to
the front, e.g. manual orderFront calls, or deferring the
original orderFront that happened when setVisible was called
from main().

Amends b49211c125.

Fixes: QTBUG-126043
Pick-to: 6.7 6.5
Change-Id: Ia9bc07a41daeb9e5b5b3306df08e5d97fa38f96f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 2fcab872bc28b39b549d941ec6bb71bd25f20593)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-07-01 17:57:41 +00:00
Topi Reinio e880bf86fe Doc: Add macros for generating a grid structure of items
These macros generate a a three-column grid of items in online
documentation.

These make for a clutter-free and more visually pleasing result
in many cases, compared to a standard \table layout.

For compatibility reasons, these macros continue to output a table
structure in offline documentation builds.

Task-number: QTWEBSITE-1144
Change-Id: Iab994b383f488dbd225c6a04d64cf41e2dbb20e9
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit a65314d5da0176224279c11398ff3c76b4cf6878)
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2024-07-01 11:44:37 +00:00
Andreas Eliasson 199f06e31b Doc: Link to QRhiColorAttachment after 'resolve texture'
After mentioning 'resolve texture', link to the QRhiColorAttachment
class to provide more information.

Fixes: QTBUG-126165
Pick-to: 6.7
Change-Id: Ib6af6b238be2c1ee1f3b15ff08e39dc07d69515d
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit c26bf302963e354ef0f2e3e0bb0a6a4f6dbafc22)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-07-01 07:38:26 +00:00
Andreas Eliasson df192e7874 Doc: Document *QRhi::create() fail behahvior
Fixes: QTBUG-126263
Pick-to: 6.7
Change-Id: Ic01843a5937c1430d24989c2de24023d4c4655ca
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit 1d3ca12338bcefe21205fac46a39ce9989995d55)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-07-01 07:38:25 +00:00
Even Oscar Andersen e596ce1285 Fix use after destruct for QWidgetWindow
The call to destroy() happened in QWindow destructor, after
̃QWidgetWindow destructor had run. This is to late since destroy calls
setVisible which ends up in QWidgetWindowPrivate which accesses
QWidgetWindow.

Calling destroy from ̃the QWidgetWindow destructor makes sure the object
is still alive when setVisible is called.

Tested manually by running the documentviewer demo as
given in the bug

Fixes: QTBUG-126456
Pick-to: 6.7 6.5
Change-Id: I2ca0384c453d59c5ffb9f3588d592701bebf3aa8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 9b99361698219a73ce1b54fe56497560e02b2229)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-07-01 06:47:36 +00:00
Doris Verria b792b40378 Cocoa accessibility: Make menu items accessible
To make menu items accessible in Cocoa we need to:
1- Tell the accessbility framework that the focused element is now the
popup menu
Since we don't give focus to the popup menu in Qt, we have to work-
around this in the cocoa accessibility framework by sending a
NSAccessibilityFocusedUIElementChangedNotification when the
QAccessible::PopupMenuStart event happens.
2- Ignore the PopupMenu role
In a native context menu in macOS, the expected accessible element
is not the menu itself, but the menu items. That is why we should
ignore the PopupMenu role and directly access the menu items.

Fixes: QTBUG-68465
Pick-to: 6.7 6.5
Change-Id: I6b45fa3c762734274b4288cddeb038018327a4fe
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit b17a8a9b26368ea39d6cec36b39286ff1b307cd2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-30 06:45:05 +00:00
Ali Kianian b0bcb24bad AssetDownloader: Make local qrc files readable in AssetDownloader
* Also warn using qrc resources for preferredLocalDownloadDir

Change-Id: Id2b54bb1053483cf46f1ee1cbbc07250a2520f18
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
(cherry picked from commit 4f53be92642c2c90dca28ca9b7795a0086e557b4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-30 06:44:58 +00:00
Jaishree Vyas 859af49b97 Doc: Documentation for QStringList::replaceInStrings
Added the text as a \note in QString::replace and QStringlist::replace
to make it more visible to the users.

Fixes: QTBUG-63485
Pick-to: 6.7
Change-Id: I519ab079ec86103a768f313cbc5ac625a0170839
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 3e56757d651ffcba9ea65aa990b4e02b05e00b17)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-30 06:44:29 +00:00
Wladimir Leuschner 41df8e68cb QWindows11Style: Respect ItemViewItem foreground color
Fixes: QTBUG-126596
Fixes: QTBUG-126543
Pick-to: 6.7
Change-Id: I39803927259092be98dad02fa286bc92520ce43f
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 7dc67d98976b7de7a34f74c9840d98aa5512d8dc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-30 06:44:24 +00:00
Rym Bouabid da18a576a9 QRandomGenerator: Add destructor
While not needed from the C++ side of things, the missing dtor in
conjunction with the out-of-line copy SMFs is freaking out style
checkers that check for Rule Of Three/Five/Zero, so just =default
the destructor.

Pick-to: 6.7 6.5
Task-number: QTBUG-124643
Change-Id: Ic21e7c0e4f0630d60eaff724e2f9d6897b720164
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit dd7ad8f8ae44e1ad01c370cd4a0558c5e66efeb8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-30 06:43:52 +00:00
Tim Blechmann 250cdbe404 GUI: accessible - silence clang's fallthrough warning
Pick-to: 6.7
Change-Id: I868aee05315e1258a8872137407a0c5132251c71
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit f91aebaa3f2a11b5681d8c9fa18c69d2ddd0da05)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-29 04:55:06 +00:00
Jøger Hansegård 1af3e2bd91 Fix ASAN crash at at startup with Gallery widgets example
It is not clear how this change fixes the issue. Maybe it is bad code
generation by the MSVC 2022 compiler?

Fixes: QTBUG-126702
Change-Id: I56f4be789aa3d1783d6305b59339984c99454bc7
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit aa3e6ab27dacaef339997c85d3859bcf077b6db7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-28 17:13:49 +00:00
Mårten Nordheim fb79071e16 QHttp2Connection: add take- and clearDownloadBuffer
Instead of retaining the data in the buffer forever.
The downloadBuffer function was only added because there may be data
received before there is a chance to connect to the signal. But then
there is no reason to keep it there forever.

Removing the downloadBuffer() function might be an idea at some point
in preference of using these.

Change-Id: I0b66676c8827570c5a25de2a28617880ccd9cf18
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit ff26a209eaac9a9013a0cc41185a38d448af97e2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-28 17:13:49 +00:00
Mårten Nordheim cb8a8afe42 QHttp2Connection: properly count only the active streams
For a function whose only purpose is to count active streams it was missing
a quite important aspect.

Change-Id: I9110949c0f00acc9fb3bc115f7a66e0c0f4502d0
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 3fe9c38053774ea3dd6b20d14dd664dd8464208c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-28 17:13:48 +00:00
Jøger Hansegård c6d6e05aae Fix leak of QWindowsUiaMainProvider instances
Pair up all calls to QWindowsUiaMainProvider::providerForAccessible
with a corresponding QWindowsUiaMainProvider::Release().

This fixes memory leaks when the Narrator application is running
for applications that are recreating UI elements frequently. RAII
ComPtr is not used here because going directly to ComPtr would make
the change harder to review. Switching to ComPtr can be done in a
separate patch.

When the Narrator application is running, we may see that the memory
usage temporarily increases, but it is reclaimed later.

Fixes: QTBUG-126530
Change-Id: I1fd76da5759354633dbf040ba42a007d349264a6
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 0e65cbc82fbd8585a201c7feb16df410078a8cfb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-28 17:13:48 +00:00
Jøger Hansegård a92e3cf301 Add missing release in QWindowsUiaMainProvider::QueryInterface
If QWindowsUiaMainProvider::QueryInterface does not return an interface
after successfully calling QComObject::QueryInterface, it must reduce
the refcount because no client will do it on its behalf.

This reduces slightly the leak rate of QWindowsUiaMainProvider
instances when no Narrator application is running.

The patch also fixes an issue where the returned pointer was still
pointing to a valid object even if E_NOINTERFACE was returned.

Task-number: QTBUG-126530
Change-Id: I96c4f6e8cfcee41e80e49f3fc874e2e0cdfa55c1
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit a9561e15e86d65e732da7f07d712325c8f16d7c9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-28 17:13:48 +00:00
Jøger Hansegård 46b5edec22 Call VariantClear to free BSTR owned by VARIANT instance
This is a minimal fix to reduce leaks of BSTR instances from
QWindowsUiaMainProvider. Introducing a VARIANT wrapper can be done as a
follow-up task.

Task-number: QTBUG-126530
Change-Id: I0c146049644517aca1b6ad7b096833faf5296329
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit a03931095dde102fdfac82e8f6dd874706cadc6f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-28 17:13:48 +00:00
Wladimir Leuschner a821bb2d32 QWindows11Style: Fix darkmode for ToolButtons in Toolbars
Fixes: QTBUG-126348
Pick-to: 6.7
Change-Id: I7088a6ba2395cce8f79f41831cf22475cd85dfe6
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 86bcddac5f68e9f1d163fac75c09ef8bd0502e1e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-28 17:13:47 +00:00
Joerg Bornemann 7477297c87 CMake: Disable unity build for QGtk3ThemePlugin
The sources pull in X includes that don't play well with unity builds.

Change-Id: Ie50aa6663adc45c86d1798872239b256c1803638
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 48e896baf6e317985c33a761048ef18b089ff891)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-28 14:49:01 +00:00
Marc Mutz 70f38f48c1 QFormDataPartBuilder: delay encoding of the part's name to build() time
This is a prerequisite for making QFormDataBuilder::part() return an
existing part instead of creating new parts with the same name
(idempotence), which was pointed out in API review.

Task-number: QTBUG-125985
Change-Id: I642e56cc7cb3562304573930a01aa1aafa817f36
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit 9503e2c92c2d3b8f5bb9c86274d2430eb0a57880)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-28 09:04:56 +00:00
Marc Mutz aefa427459 qHash(): make 1-to-2-arg adapter a worse match than regular 2-arg overloads
... by adding more arguments, but then constraining that they don't,
actually, exist.

This makes the the signature of a normal qHash(T, size_t) consistently
a better overload (for same T) than the 1-to-2 adapter. It doesn't
solve the problem that the adapter inserts hash functions for types
that were never defined to be hashable (cf. e.g. QTBUG-116076). But
the adapter is already slated for removal in Qt 7, which will solve
the issue, though maybe we can expedite its demise in 6.9.

Add the test from the bugreport to tst_QHashFunctions.

Fixes: QTBUG-126659
Change-Id: Idb3f275f0409652d55b318d56092764371269c06
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 798c23189c7fb73629c1a98361cb1f50446fecf1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-28 09:04:56 +00:00
Ali Kianian d699966713 AssetDownloader Add a virtual method for resolving urls
Change-Id: Ie771fd955e6b44ff4825243791029c4fcea0d493
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
(cherry picked from commit 3e3cf6dca96180a4f86c0780baad93fb29c2c994)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-28 09:04:55 +00:00