65539 Commits

Author SHA1 Message Date
Marc Mutz
9b3820c7d3 QObject: de-pessimize installEventFilter()
Don't loop over the list of event filters twice, do it once with a
combined predicate.

This code is still has a big impedance mismatch: the removeIf() will
always leave empty space at the back while prepend() needs it at the
front. We should fix this by reversing the meaning of the order of
event filters to mean back()-is-applied-first, so new filters can be
append()ed, but that is for another patch.

Done-with: Jarek Kobus <jaroslaw.kobus@qt.io>
Change-Id: I08324697229a54c8f66c6c320cf7232d707a08f1
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
(cherry picked from commit edff6a33a1e3757b9bb4831091a3db8fa99e3219)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-15 14:00:12 +00:00
Jarek Kobus
a16964e471 QObject: Optimize removeEventFilter
We can't have duplicated filters installed,
so break the loop when removing event filter after we
have found the matching one.

Change-Id: Idda87f3090954e020b27bf3fab62677128607f03
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit b909b8dfe808ed6bbb9f4353729c8810ee0e95c7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-15 14:00:11 +00:00
Ahmad Samir
af9b70c5ed QFileInfoGatherer: add some API docs
Task-number: QTBUG-99750
Pick-to: 6.6
Change-Id: I908e1135b895dbf6116b1dce7416b14905b886b2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 0cda986eb6cdf681cb64811b416c413645cb0f3d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-15 14:00:11 +00:00
Juha Vuolle
86e5979d51 Rename QHttpHeaders::has() to contains()
Resulted from API-review

Change-Id: I84e880dc6edb9c62fd1ddd50d477347443fd52a7
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit e2462b09b7dcbd52c4be0df5f01508dacf27cab5)
2024-01-15 16:00:11 +02:00
Laszlo Agocs
149da3331b rhi: gl: Pretend 4x MSAA is always supported when cannot query
With ES 3.0 and up the GL_MAX_SAMPLES query is available and is
guaranteed to be at least 4.

With ES 2.0 there is no such query.

While what we report from supportedSampleCounts() has little
significance with OpenGL (for the window's color buffer it is
anyway the QSurfaceFormat that decides, not QRhi), QRhi users
such as Qt Quick may rely on supportedSampleCounts() returning
real values and may, for example, warn if the value attempted
to use is not in the supported list. (even if MSAA is fully
functional)

Avoid getting such warnings on a pure ES 2.0 implementation
with 4x at least.

Pick-to: 6.6 6.5
Fixes: QTBUG-120474
Change-Id: I8a34a8bc9ce37ce951fdf7794247e8db44435d41
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit 520d755d324a32c97cb9e25b617e99d0ab93d666)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-15 10:31:15 +00:00
Alexey Edelev
30bb85962e Add BuildInternals lookup to the settingseditor manual test
Change-Id: Iae39efccaac26bcd12b416c05af36a545dca59b6
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit 9ba5c25f1267f0c85d1020be7d8163b918cc3a89)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-15 09:56:13 +00:00
Hatem ElKharashy
4596aa7bfe QRadialGradient: Fix undefined behavior
The UBSan raises a division by zero in getRadialGradientValues. This can
be avoided by calculating the inverse in
qt_fetch_radial_gradient_template as a checker is done to avoid
division by zero there. (Credit to OSS-Fuzz)

Fixes: QTBUG-120332
Change-Id: I798d1efc87ee07df7ca6f401aa476013cdbffe42
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 69bed6cd3f12a3c1b0182c5a3706efa617090cfa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-15 09:45:46 +00:00
Tor Arne Vestbø
b814f73fb6 macOS: Show extensions in file dialog when filtering on multi-part extension
File extensions with multiple parts, such as as ".tar.gz" are not natively
supported on macOS. Asking NSSavePanel to only allow file types with such
extensions confuses it severely, so we work around it by reducing the
native file name filter to the last component of the extension.

In this situation, we explicitly tell the NSSavePanel to show the full
filename, including the extension, so that the user can more easily
see what the final file name will be.

However, as part of 7f8a80ebf87cccb57da316202e5350eb5eca9d5d we ended
up changing the logic to count the number of possible extensions for
a given file type filter, not the number of parts in the extension.

The logic has now been restored, but moved to init, so that it applies
even if the initial filter is not a multi-part extension.

Task-number: QTBUG-109877
Pick-to: 6.6 6.5 6.2
Change-Id: I244cea1cc2977f8adf7e359ea7116bbfad0e1059
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit fd817c28a03f8b6743ea678c9edf3f8f047db627)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-15 09:04:51 +00:00
Juha Vuolle
b7e793f627 Add streaming text support to QRestReply
Provides the possibility to read text data as it arrives, instead
of needing to wait until the whole body is received.

Task-number: QTBUG-119002
Change-Id: I64f90148fd41a77c4ae2d5dbd6194a924a9f3a86
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 4da14a67a6157c415f8228a8bae7d6b0f895df7c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-15 06:01:15 +00:00
Thiago Macieira
1bb0cc0923 tst_QStringView: don't go through the QString constructor
Amends d351a97e85e5ed8acd7ad1357ef76dc2e0ad639f.

Pick-to: 6.6 6.5 6.2
Change-Id: I5201966b308e48989c06fffd17a9aa4d086e6039
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 80df23bc7b966c0c0f984ff20d5d0dc1e0b2e025)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-15 06:01:15 +00:00
Thiago Macieira
9962441bfd QProcess/Unix: detect ASan and TSan dynamically
Fixes: QTBUG-117533
Fixes: QTBUG-117954
Task-number: QTBUG-104493
Pick-to: 6.6
Change-Id: I09c3950e719e4b259bc7fffd1793ee472c5d5a9a
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 7c4e271fe73f4775d308d5851c07bc21cdd08570)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-14 20:45:25 +00:00
Axel Spoerl
49bfdf7e67 Stabilize tst_QMessageBox::hideNativeByDestruction()
The test was flaky, because of qWaitForWindowActive() after show().
It is not guaranteed, that a window has focus after show().
Use qWaitForWindowExposed() instead.

Task-number: QTBUG-118489
Pick-to: 6.6 6.5
Change-Id: I1eb8a73f2beafec00c4a6f6b34bfd36a8d6e4d93
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 599328845c7e77bc7b4fd5b4f2de000bb463a814)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-14 16:20:25 +00:00
Ahmad Samir
9fb14df814 QObject: clarify docs wrt. member access following Q_OBJECT and co
The macros expand to declarations that end in a private: section, which
means everything following them is private. As Fabian said in the bug
report, this is obvious when Q_OBJECT/GADGET ...etc are used in a class,
but might be a bit surprising when used in a `struct`.

Fixes: QTBUG-120297
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: Iacdfc4eb3bab3554cc1142f682b11b32c3868b8f
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit eb2db79064bd6e74d0b3485a650e4025d0a39c96)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-14 12:44:44 +00:00
Kai Köhne
eb96856806 Simplify QHttpHeaders documentation
Simplify wording, leave out historical baggage (which
is not really relevant for users that look into new code).

Change-Id: I9be1d42b6d75dd4bf6fccd6ecb47bc7cd6026ed3
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit f23154c05ba0de300d017f1c50910da324414eef)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-14 12:44:44 +00:00
Axel Spoerl
8e67c782a6 QGenericUnixTheme: Rename ColorTheme enum value to ColorScheme
ColorScheme is used in Qt as a name for dark/light desktop mode
properties.
The enum value was named incorrectly.

=> Fix it.

Pick-to: 6.6 6.5
Change-Id: I2aa72f81e36c0997127dd6de0e23d4773509ba40
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
(cherry picked from commit c4bd6ac4e5a0782d8771af1485a3b78733180785)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-14 09:44:11 +00:00
Andreas Eliasson
58d6b0a1af Doc: Wrap arguments to \inlineimage in curly braces
Wrap the arguments to \inlineimage in curly braces so that the
describing image text doesn't show on the page.

Fixes: QTBUG-120572
Pick-to: 6.6 6.5 6.2
Change-Id: I00f4befc64c20fb6de1dd5ddcb6ca2573fa7c355
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 5358d7a5fe394a37435a947484f1efb7ce297fa2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-14 09:43:39 +00:00
Tor Arne Vestbø
c69ad0a66e Tweak QObject::deleteLater() documentation a bit
The Qt 4.8 reference is not relevant. And mentioning that calling the
function more than once is safe, or why that is, is strange, as users
should still treat the object as something that will go away soon.

Change-Id: Icf24aa8ffe079e35351006dd77063df48a596fab
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit e02dc31fbf3ae460bea2aea068ccc969d6e852fc)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-01-14 10:43:19 +01:00
Axel Spoerl
f83ba9d3cf API Review / QDockWidget: Remove const/ref debug operator
Remove the debug operator taking a const QDockWidget & argument.

Leaving the override taking a pointer.

This amends bbeff2a3350dd3396400865525d509b784c2d93e.

Change-Id: I0fbca6ea7dbffe6269c70e5e9eb29af9f84c3600
Found-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Task-number: QTBUG-119952
Pick-to: 6.6
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit ca2f46c04c26ed4649cb6c2c62d3b2e52cd8d5ad)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-14 09:42:49 +00:00
Axel Spoerl
744313ae79 tst_QHostInfo::reverseLookup(): code cleanup
Remove redundant curly braces.
Use constFirst() instead of first() on a temporary list object.

Task-number: QTBUG-120460
Pick-to: 6.6 6.5
Change-Id: Id643b20dfa5a541fea56abfdbcf933245a8a3c9d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 3c5e37fe0ff761bd4ee4eeea67881ec7b8eadad5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-14 09:42:10 +00:00
Juha Vuolle
7c06008369 Remove an unused, leftover, include
Task-number: QTBUG-119002
Change-Id: Ic4054e82c11eede7823389d534bbe56328ce3dc8
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit ec98afd19265cd1c70db86f3620a21625efb9c72)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-14 09:42:03 +00:00
Jacek Poplawski
460d555e69 Make sure OpenGLContext is not nullptr
In QOpenGLCompositorBackingStore::resize it is already checked whether dstWin is valid, but dstCtx may also be nullptr at this point.

Task-number: QTBUG-120078
Change-Id: I4a6ad71dd8225b94baff05984275ad1860298dfc
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit 3f724466374cc34d0aba862f009a417540df81cd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-14 09:39:02 +00:00
Andreas Eliasson
38cd31b033 Doc: Add code example to describe targeting precompiled libs
Fixes: QTBUG-120263
Pick-to: 6.6
Change-Id: Iba7e3bf68e4fc48764e4a751e14c398355a94173
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Orkun Tokdemir <orkun.tokdemir@qt.io>
(cherry picked from commit d9d48280122609b90db74bc9ac4e8e83f0b8b958)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-14 09:38:47 +00:00
Kai Köhne
60873058f0 Doc: Adapt to changed names of positioning examples
Change-Id: I053b8f47dd6a37c9ca49d73d5f0d8cdbc73f37b9
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 6b0a5fe93bb92205f0988c196251d4d2f36121e1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-14 09:38:45 +00:00
Kai Köhne
4348debfb4 Doc: Remove dead links to Concentric Circle Example
Amends 33254fb41f29b510d

Pick-to: 6.6
Change-Id: I81fee9ba277fdc6f3609440ddcf69cf7c3924c70
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit efcfda3d84d0fb7e4b3270a7d96b3b95db8d522c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-14 09:38:40 +00:00
Juha Vuolle
b2acd592d2 Add QHttpHeaders::reserve()
Found in API-review

Change-Id: Ia41eb91e9e62a252b76c20c67c1c599c0f6a633d
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit b5665f6fab40232a81a056523608c295c8167bc6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-14 09:38:36 +00:00
David Faure
1ba994bb0a Fix qWarnings Could not connect "org.freedesktop.NetworkManager" [...]
Could not connect "org.freedesktop.NetworkManager" to "stateChanged" : Type not registered with QtDBus in parameter list: QNetworkManagerInterface::NMState
Could not connect "org.freedesktop.NetworkManager" to "connectivityChanged" : Type not registered with QtDBus in parameter list: QNetworkManagerInterface::NMConnectivityState
Could not connect "org.freedesktop.NetworkManager" to "deviceTypeChanged" : Type not registered with QtDBus in parameter list: QNetworkManagerInterface::NMDeviceType
Could not connect "org.freedesktop.NetworkManager" to "meteredChanged" : Type not registered with QtDBus in parameter list: QNetworkManagerInterface::NMMetered

These came from the fact that QDBus reimplements connectNotify() to
detect connections to a dbus interface's signals. It was triggered
also when connecting to "normal" signals from the dbus interface
subclass QNetworkManagerInterface, leading to those (new) warnings.

The fix in this commit replaces signals with direct method calls,
given that the two classes are internal and that QNetworkManagerInterface
is only used by QNetworkManagerNetworkInformationBackend (and now
vice-versa too).

Change-Id: Ifef3f65ab8e4e21a2f7fdba7fa5f0fc566153649
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit cb9b46ef70f06c51aea01e83dd07d21a56627a50)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-14 00:05:26 +00:00
David Faure
f5cdefb3ab Move QNetworkManagerNetworkInformationBackend to its own header file
(in preparation for the next commit)

Change-Id: I1a6771dc953540dfa63cb80306a48122e97eb600
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
(cherry picked from commit 9468c0e3ca4b145ffadc83170c804db5fbf0895a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-14 00:05:17 +00:00
Volker Hilsheimer
11db1179a8 QColorDialog: Add trailing comma to new enum value
As commented in header review, this will make future header reviews
less noisy.

Change-Id: Ia75e51facec100172de7dbb0854830d9981f0552
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
(cherry picked from commit ab6e3c59a35e94a6740ae593b6101144fb65e089)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-13 17:53:52 +00:00
Giuseppe D'Angelo
2c10bc7e12 QImageIOHandler: doc tidies
Remove a "." after the enumerator names that would end up in the docs.

This work has been kindly sponsored by the QGIS project
(https://qgis.org/).

Change-Id: I6db1e83331552a58f77479166a67b88bb25f2d6e
Pick-to: 6.6 6.5 6.2
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit e366a47d65c782055a9e361ad7e18bda6cd33780)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-13 17:53:52 +00:00
Axel Spoerl
b30f214681 Remove dead code from tst_QMessageBox::staticSourceCompat()
Remove if (0) clause.

Task-number: QTBUG-118489
Pick-to: 6.6 6.5
Change-Id: Ie1c72e9c7cacb90d9e4d85763cd2f6967a7572cd
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 09eb99f0116b459a9ce5f720ee1a6d9715f157ad)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-13 17:53:52 +00:00
Liang Qi
b70496888c tests: skip tst_QShortcut::applicationShortcut() on Wayland
Task-number: QTBUG-120334
Change-Id: I0c71c6f474f1a0f31bc823579a54556a3e64bda2
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit d14a1ceffb87b6b62b6a79625be190d40ca9630d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-13 17:53:51 +00:00
Kai Köhne
bfc841f149 Fix warning on SQL Browser startup
Browser::addConnection is not a slot/invokable, and requires arguments.

What was probably meant to happen is that the connection dialog
opens.

Pick-to: 6.6 6.5
Change-Id: I4e6bffb3e0277ca3deb7111cf4bb47ff188f6f16
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 3552afe38a6ba3feebe4fd9ecd561a8c0c2b9717)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-13 17:53:51 +00:00
Liang Qi
0b04acd1f0 tests: XFAIL tst_QShortcut::windowShortcut() on Wayland
Task-number: QTBUG-120334
Change-Id: I6cafda6fa8f8c9b20a6695b982413057ddf56dd2
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit cf0d34bf18cc1dcac0bdfbed5b2be10c79902543)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-13 17:53:51 +00:00
Axel Spoerl
08d282b451 API Review / QDockWidget: Fix TODO comment
Use ### Qt 7 syntaxt instead of TODO.

This amends 3aaeef59fba8e8c6cf168a26cffc054375c7c21b.

Change-Id: I0354debbe43796aa6bd2cf04d567fd932fde3c66
Found-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Task-number: QTBUG-119952
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit 24d84a86cffe07f27965cb3e4b32aa78f4c76977)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-13 17:53:50 +00:00
Florian de Gaulejac
8e424eba74 syncqt: always use absolute path in the generated headers
The relative path + source path can be tool long for windows

Fixes: QTBUG-120758
Pick-to: 6.6 6.5
Change-Id: I42ed4f3bbf39d31bf37a5bc76eb18f473661346b
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit b4246a5c28472de3c4b6a85a3daf4a1d578894ab)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-13 17:53:50 +00:00
David Faure
54e2ec9b8a Doc: fix typo in QGraphicsView::rubberBandRect() method documentation
outise -> outside

Change-Id: I143430b3c6661cf5259a09ffa64b74a220e2b979
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 47c5f6b4c2a66db7d169fed451f08af6fbe21c39)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-13 17:53:50 +00:00
Christian Ehrlicher
9622c7797a Styles/fusion: Adjust QSlider painting with modified paint rect
When the painting rect is adjusted within an overloaded
QSlider::initStyleOption() there are some glitches when using the fusion
style:
 - the tickmarks are not painted inside the specified rect / it is
   ignored
 - the glue groove bar is clipped incorrectly

Pick-to: 6.6
Fixes: QTBUG-111314
Change-Id: If140c5348031d869b527c6c4850b4a8d34b395c1
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 8594fe1b8dc848d8a2d61197acce67963f5fe20e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-13 17:53:50 +00:00
Volker Krause
33b4c2d4af Fix opening temporary content: URIs from application content providers
e5d591a0d09 focused on document or tree URIs you'd get from the file
dialog, but we can also get ones via Intents from application-specific
content providers (e.g. opening an attachment from an email client).
Those need to be handled like a single document here, parsing them
like a tree URI results in a bunch of Java exceptions down the line.

Change-Id: I19cb1075fd6a3ccad927543f8bc5a63566f4877e
Pick-to: 6.6 6.5
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 9d4a34bbbe7ec39ef594b07aae06fc1029cc6e3d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-13 14:04:35 +00:00
Tor Arne Vestbø
3bc3cf3ba9 Sync QWindow visible state during QWidget destruction
A call to QWidget::destroy() will end up in QWindow::destroy(), which
calls QWindow::setVisible(false).

A call to QWindow::setVisible(false) on a widget's window will under
normal circumstances end up in QWidgetPrivate::setVisible(), which in
turn recurses back into QWindowPrivate::setVisible(), via
QWidgetPrivate::hide_helper(), ensuring that the QWindow internal
state is updated, visibleChanged emitted, and show/hide events sent.

Durin QWidget::destroy() we end up in QWindow::destroy(), which calls
QWindow::setVisible(false), but in this case the widget no longer has
Qt::WA_WState_Created, so the hide_helper() call is skipped, and the
corresponding QWindow is not kept in the loop.

To work around this we could have checked for windowHandle() instead
of Qt::WA_WState_Created before calling hide_helper(), but that had
many other side effects, so we opt for a more targeted fix.

Pick-to: 6.6 6.5
Change-Id: I68f80e5f7df9ee811afcd274a7ee4de31a110da5
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 5b09d9e6d694045a6cef15f8984bab63cf86402c)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-01-13 11:49:33 +01:00
Thiago Macieira
0523b04216 QUrlQuery/Doc: fix resulting query with ( and ) delimiters
There's no final ) because there's nothing there to be delimited.

Pick-to: 6.6 6.5
Change-Id: I6e2677aad2ab45759db2fffd17a4ce4aa902e140
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 88e41fd03481d490e7fcf9429849c8fa5a5743e5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-13 01:30:23 +00:00
Assam Boudjelthia
86f840fb02 Revert "Bump androix dependency to 1.12.0"
This reverts commit 3bae65e7d61f85d2942c89e46e913c1056ba2daa.

Reason for revert: This version requires API >= 34 but we have AGP
7.4.1 which was tested against API 33 max, and updating it to version
8.x is blocked by QTBUG-106907. So, this will be re-stated AGP update
is done.

Task-number: QTBUG-106907
Change-Id: I1551ace76392a0532e1ecf431d03afbbd9d4a300
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 91b0f269ba8fc0ae16f96b18327b5aa30718b313)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-12 21:41:52 +00:00
Thiago Macieira
946f39b477 QSemaphore::release: Revert "Optimize cond var notification"
This reverts commit 60113056bc4c328f62808d1c0fa2a1abec481f78. Calling
    d->cond.notify_all();
without the mutex means that another thread could acquire the semaphore
(acquire the mutex, subtract from d->avail, return to caller) and
destroy it. That would mean this thread is now effectively dereferencing
a dangling d pointer.

Fixes: QTBUG-120762
Pick-to: 6.6 6.5
Change-Id: I196523f9addf41c2bf1ffffd17a96317f88b43dd
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
(cherry picked from commit 763ab0e6236de80a0b589fc574c75a414d86d374)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-12 20:01:32 +00:00
Ivan Solovev
5b8515bae7 QCborStreamReader::lastError() - fix REMOVED_SINCE version
The definition in removed_api.cpp is added within the proper #ifdef
block, only the version in the header was wrong.

Amends 8e8815b688684f5b267db1c2d8ac99c8f7f7637a

Found in 6.7 API Review

Change-Id: I0a94bfaae8b3db700c794aa83d9637ec85edffb1
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit a4518cc706ed9ef8ed7fd79ed3423b64c6d1fb93)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-12 16:54:07 +00:00
Christian Ehrlicher
eb31663d03 QFusionStyle: fix painting handle with tickmarks enabled
The handle was drawn outside of the widget's rect when tickmarks were
enabled (TicksAbove/TicksLeft).

Pick-to: 6.6 6.5
Fixes: QTBUG-83604
Change-Id: Iff3a1a330317576a759e3fd6795d0b4849e2044b
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 574692e5ac95e1f2061812a43f14d325c077b7c8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-12 16:47:37 +00:00
Christian Ehrlicher
43c220149f QIcon::availableSizes(): don't return duplicates
QIcon::availableSizes() returned duplicate sizes when there are pixmaps
with a different dpi but same size. This is not useful and therefore
filter them out. Also rearrange the conditions a little bit to bail out
on wrong mode/state early.

Task-number: QTBUG-119915
Change-Id: I9d18c78fc2a149a3a9eaaed67c6110979029705b
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit c53b91cc12164d779a69c2526d85e3ab9c2841e2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-12 16:47:36 +00:00
Christian Ehrlicher
8e6b46fa65 QComboBox: ignore hidden items when calculating popup size
The popup size depends on the max visible items property. But the loop
did not ignore the hidden items which results in fewer items in the
popup than allowed.

Fixes: QTBUG-120574
Pick-to: 6.6 6.5
Change-Id: Ic3c503a5272d6839aee158740e096405ca8887d6
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 742be5254c9919e8c743b8b489c054d778ee4850)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-12 16:47:35 +00:00
Artem Dyomin
12fb9c4dbb Add an opportunity to grab via QOpenGLCompositor to FBO
The feature is needed for screen capturing Qt multimedia in order
to have better performance of getting frames
(avoid recreating fbo). In QtMM, we're going to create FBO
and use it as a hw frame (or just render it to image on the first stage)

Pick-to: 6.6 6.5
Change-Id: Id08a86b76447faa0f341c6967c2dad8f34c84959
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit b96160191fc79514173b202bf6325553a798926d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-12 11:06:04 +00:00
Alexey Edelev
4dfaabce57 Add the support of the qt_import_plugins functionality to androiddeployqt
qt_import_plugins allows to control application deployment on
non-Android platforms. This adds support for the pre-defined plugin list
that is computed using the qt_import_plugins input.

Pick-to: 6.6 6.5
Task-number: QTBUG-118829
Change-Id: Iaa9c3f600533a4b5a3079ab228fabf212d9ce5a5
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 438837ce274fdc1457b66179b25df40f33b23a15)
2024-01-12 11:06:04 +00:00
Milian Wolff
45f5991e60 Fix potential leak of QPropertyAnimation in QLineEditIconButton
When startOpacityAnimation is triggered and the animation doesn't
finish, it might get leaked during shutdown as shown by valgrind:

```
==133963== 600 (16 direct, 584 indirect) bytes in 1 blocks are definitely lost in loss record 2,326 of 2,356
==133963==    at 0x4841FA3: operator new(unsigned long) (vg_replace_malloc.c:483)
==133963==    by 0x12698E2D: QLineEditIconButton::startOpacityAnimation(double) (qlineedit_p.cpp:437)
==133963==    by 0x1269900D: displayWidgets(std::vector<QLineEditPrivate::SideWidgetEntry, std::allocator<QLineEditPrivate::SideWidgetEntry> > const&, bool) (qlineedit_p.cpp:459)
==133963==    by 0x126A1084: QLineEdit::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_qlineedit.cpp:276)
==133963==    by 0x152D781E: void doActivate<false>(QObject*, int, void**) (qobject.cpp:3935)
==133963==    by 0x1269AB01: QLineEdit::textChanged(QString const&) (moc_qlineedit.cpp:447)
==133963==    by 0x126A0EF8: QLineEdit::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_qlineedit.cpp:255)
==133963==    by 0x152D781E: void doActivate<false>(QObject*, int, void**) (qobject.cpp:3935)
==133963==    by 0x126A1A94: QWidgetLineControl::textChanged(QString const&) (moc_qwidgetlinecontrol_p.cpp:273)
==133963==    by 0x126A4C35: QWidgetLineControl::finishChange(int, bool, bool) (qwidgetlinecontrol.cpp:736)
==133963==    by 0x126A4F05: QWidgetLineControl::internalSetText(QString const&, int, bool) (qwidgetlinecontrol.cpp:772)
==133963==    by 0x12698AF4: setText (qwidgetlinecontrol_p.h:251)
==133963==    by 0x12698AF4: QLineEditPrivate::setText(QString const&) (qlineedit_p.cpp:277)
```

Note that the line numbers above are potentially slightly off as that
backtrace was recorded on Qt 5.15.9.

Pick-to: 6.6 6.5 6.2 5.15
Change-Id: Ie79744d98d2783e4644e18ec51892c0bc43c1557
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 76845e1d31a61735a0f0261fbc15ed7ea5ff71dc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-12 11:06:04 +00:00
Marc Mutz
5981ceb865 tst_QCompareHelpers: fix narrowing warning
Warns MingW (or, in general, any GCC 13):

   warning: converting to 'QtPrivate::NativeFloat16Type' {aka '_Float16'} from 'double' with greater conversion rank

See also a61d7529511c890aa595110b9320ea0bf53dd623.

Fix by using ints instead.

As a drive-by, make the variable constexpr.

Amends 4b755bc11a8eadd156c65b7474c11e3ce822c6f1.

Change-Id: Ie3f3c51aa7e9323c7ba96c810d2e95247d222fd2
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 6d005b7c570f2ad25cf2b88329a2f99ab20b8787)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-12 11:06:03 +00:00