74548 Commits

Author SHA1 Message Date
Olivier De Cannière
5aa1bc4621 Widgets: Set viewItemPosition style option for QTableView and QListView
Before this patch, we did not set the view item positions in the views.
This was fine as they were ignored until
b780eaf6a063a7efe03417cf6b7008a188e222a4 added a condition to early exit
on invalid positions. This then broke all qss background styling using
QStyleOptionViewItem::ViewItemPosition as they were always invalid.

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

Fixes: QTBUG-137346
Pick-to: 6.10 6.9 6.8
Change-Id: I83d7a3ea7b9bab98889791bb807988a74e355b93
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
2025-06-12 17:22:23 +02:00
Petri Virkkunen
76bf2512e7 Android: Add default template argument return type to AndroidBackendRegister
For AndroidBackendRegister::callInterface, it would be more convenient
to call simple functions without parameters, without being forced to
specify the void return type. Added a default void type argument for
the return type.

Change-Id: Ib7f631c172955cdf0b2e853155fd57c06bef9843
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2025-06-12 13:37:19 +00:00
Petri Virkkunen
43e52253d5 Android: Add some developer documentation to AndroidBackendRegister
A quick blurb to explain the usecase and limitations of
AndroidBackendRegister, meant for future developers.

Also documents the two public-facing functions, getInterface()
and callInterface().

Change-Id: I79f07d4a19fdb1f4a53529ab42a8663999759f85
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2025-06-12 16:37:19 +03:00
Morten Sørvig
c2ec20b226 wasm: don't recreate WebGL context on surface change
The native WebGL context is tied to a single canvas,
and can only be used with that canvas. (Qt creates
one canvas per QPlatformWindow).

This means that we need new native contexts in cases
where a QWindow is repeatedly created and destroyed.
It can be tempting to just create a new WebGL context
"behind the scenes" on the makeCurrent() call in this
case, but this does not work since GL resources created
by user code with the original WebGL context in place
are now invalid.

Inform user code that this has happened by signaling
a context loss. This is done by returning false from
makeCurrent(), and then making sure isValid() returns
false as well.

The context becomes invalid whenever the owning platform
window is destroyed; add a call from ~QWasmWindow() which
handles that bookkeeping.

Pick-to: 6.10
Task-number: QTBUG-120138
Change-Id: I929b9bb51153007c16630b1a991399f01ebffa62
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2025-06-12 15:37:19 +02:00
Gleb Popov
59c29436db QNativeSocketEngine: React on POLLHUP too when selecting for writing
FreeBSD may return a single POLLHUP revent not coupled with any of POLLOUT nor
POLLERR. This causes a busy-loop, so put POLLHUP into write_flags.

Change-Id: Ief62138eeb6de8e2caf1d6937507bfd828adfb81
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-06-12 15:20:49 +03:00
Gleb Popov
4ba106b38f QEventDispatcherGlib: Put G_IO_HUP into pfd.events for all cases of QSocketNotifier::Type
On FreeBSD when asked for POLLOUT the poll() syscall returns only POLLHUP to
signify the fact that the other side closed the connection. It never sends
POLLERR for EOF cases, which results in a busy-loop inside the Glib dispatcher:
- poll() returns immediately with POLLHUP for a closed socket
- socketNotifierSourceCheck() does not detect it, because .events = POLLOUT | POLLERR
  and we get .revents = POLLHUP. The (events & revents != 0) condition evaluates to false
- the code decides there is nothing to do and a new iteration starts

A similar issue in dbus code: https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/526

Change-Id: I2660a5179031da8eb9fe2562abe7fb283c77f64a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-06-12 15:20:49 +03:00
David Boddie
5b86fca7cf Doc: Remove redundant "see also" link
Pick-to: 6.9 6.10
Change-Id: Id48d97a171b55f3dbf8d1fa32e23b82d28e5552d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2025-06-12 12:20:49 +00:00
Thiago Macieira
25f396218d QBasicMutex: bring back fastTryUnlock for MSVC
MSVC exports inline functions, so we're not allowed to remove them. This
is an unlikely problem, though, since it was only called from other
inline functions: if the compiler was inlining content into user code
(as it should), then it would likely have inlined this one too; if
instead the inliner was disabled, then it wouldn't have inlined the
caller either.

Amends commit 1957597aa6bc6ebd8bd1f903389800897411ac5d. Seen in API
review.

Pick-to: 6.10
Task-number: QTBUG-137478
Change-Id: Idd01170c3396c5b6fefefffd748f3335fc42fd79
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2025-06-12 12:20:49 +00:00
Marc Mutz
184d0bf2ec QSharedPointer: fix uninit'ed field 'destroyer'
The getAndRef(const QObject*) function failed to initialize
ExternalRefCountData's destroyer field: the Qt::Uninitialized ctor
doesn't init anything and there are no following assignments to the
field, either.

This probably a) caused some Coverty complaint (but I didn't check,
because the Coverity UI is so clumsy) and b) was harmless, seeing as
the -1 in strongref indicated that the destroyer is never to be fired.

Fix it nevertheless by initializing it to nullptr.

Amends the start of the public history.

Pick-to: 6.10 6.9 6.8 6.5
Change-Id: Ib76b4bc00b08289bb8d6d58096b43501b47814d1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-06-12 14:04:58 +02:00
Marc Mutz
e4b0549a4c QSocks5SocketEngine: don't depend on zero-initialization of QBasicAtomic
It's unclear¹ whether static zero-initialization of a static
QBasicAtomic actually initializes the object with a zero value, or
whether it remains default-constructed (without a value until a
following call to std::atomic_init gives it one).

Play it safe and use Q_BASIC_ATOMIC_INITIALIZER(0) to dodge any issues
the old code may have had.

¹ see ongoing discussion on the Jira ticket

Amends 04d6495bf773a6bb0d4fa6980df22d3b81a605b0.

Task-number: QTBUG-137465
Pick-to: 6.10 6.9 6.8 6.5
Change-Id: Iee0d75ce10a589390afdd9069b7040a1c9c608e1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-06-12 14:04:58 +02:00
Marc Mutz
5aefe2d9a1 QRegion: fix potential UB in QBasicAtomic initialization
Until C++17 (inclusive), a default-constructed std::atomic object can,
officially, only be initialized with a call to std::atomic_init, for
which QBasicAtomic doesn't have API. It is even unclear whether
zero-initialization of static and thread-local objects will cause the
object to be initialized.

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

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

Task-number: QTBUG-137465
Pick-to: 6.10 6.9 6.8 6.5
Change-Id: I4b765aed329211984c35c40fbc5648bf104990ce
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-06-12 14:04:58 +02:00
Jani Korteniemi
3047d6a8a1 Fix androiddeployqt copying build directory
When project's Android package source directory is set to the
project level (instead of project/android) androiddeployqt keeps
copying the build directory under itself infinitely.

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

Pick-to: 6.5 6.8 6.9 6.10
Fixes: QTBUG-126743
Change-Id: If45766152c6cbf9e2ee916baa5a15282d3fedaf2
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2025-06-12 08:58:39 +03:00
Marc Mutz
270b219410 QTRY_IMPL: revert an incorrect change to a code comment
The comment in the QTRY_IMPL macro definition pertains to the
following using namespace std::chrono_literals, which has nothing to
do with the default timeout of QTRY_ macros, because that is
determined somewhere else. Further, "5 seconds" is not a valid chrono
literal, as "5s" was.

Partially reverts 55f163382d36ddf908fc2884f2020a1b92340c10.

Found in API-review.

Pick-to: 6.10
Change-Id: Ic1242436bf87d7067e3c5240eb2687505e24800f
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2025-06-12 00:34:17 +02:00
Marc Mutz
f1e1a933a6 qdebug.h: remove duplicate includes
Added by 51f702d4029148570d255daef80d071d98cf1e16 w/o rationale.

Found in API-review.

Pick-to: 6.10
Change-Id: Ia0afd3d3aaf7a8bc392333b8359ce5b5496bec7f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2025-06-12 00:34:17 +02:00
Mårten Nordheim
9ed754e754 Schannel: fix verifying intermediate certificates with netscape ext
We were always checking 'client' or 'server' usage depending on our own type,
which breaks for any intermediate certificate with the 'ca' usage set.

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

Pick-to: 6.10 6.9 6.8 6.5
Fixes: QTBUG-137041
Change-Id: I268f3bad669df77351fc458f56e318db75ecac7b
Reviewed-by: Mate Barany <mate.barany@qt.io>
2025-06-11 21:22:55 +02:00
Volker Hilsheimer
33dc247b6a Test: don't discard result of QFile::open
QVERIFY that the file could be opened, fail the test if it couldn't.

Pick-to: 6.10 6.9
Change-Id: Iab9b819e70b71fade6a58286edff8e022748d9f6
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2025-06-11 20:10:43 +02:00
Fabian Kosmale
3f0261ebe3 QSFPM: Support source model undergoing reset during setSourceModel
Since 9d8663c18e88cb0b5a65f86cfd7726f3d31e04d6, we print a warning when
endResetModel is called without beginResetModel.
This however triggers false positives with a QSFPM if we set a source
model which is resetting at this point in time:
The QSFPM reacts to the endResetModel signal in _q_sourceReset by
calling its own endResetModel, but it does not have the resetting flag
set.
Fix this by deferring the endResetModel work that we are doing in
setSourceModel if the source is undergoing reset.

Task-number: QTBUG-132775
Pick-to: 6.10 6.9 6.8 6.5
Change-Id: I363f2f34a06cc5de031fa87c6274322bf03bd77f
Reviewed-by: David Faure <david.faure@kdab.com>
2025-06-11 20:01:04 +02:00
Topi Reinio
a9a68a87b9 Doc: Adjust styling of QML property signatures in offline docs
Recent changes in QDoc's output for QML type reference pages included
rearranging the `extra synopsis` element, i.e, read-only, since, and
deprecation information for properties.

As a result, the existing CSS for the offline documentation caused some
elements to be rendered on top of each other when using the qlitehtml-
based backend in Qt Assistant and Qt Creator.

To fix the layout, set a fixed width for the table elements that
are used to display the properties, property groups, and methods.
This change brings the style of QML reference pages closer to that
of C++ reference, where signatures also have a fixed width.

Pick-to: 6.10 6.9 6.8
Fixes: QTBUG-136990
Change-Id: I72adbeaca46cd9dd99c54368257268dc8db6bfdc
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: David Boddie <david.boddie@qt.io>
2025-06-11 17:21:52 +00:00
Matthias Rauter
25df8042a4 Incorporate the sub-class-of info when deriving mimetypes
The tika mimetype database contains multiple rules that would fit to a
valid file (e.g. svg file that is svg and xml) with the same priority
(50 in case of svg and xml). The choice is thus ambiguous which leads to
regressions in the reported mimetype.

In order to break ambiguity, we look now also at the sub-class-of
element and we prefer sub-classes as they are more narrow and detailed
than the super-class.
The recommended checking order of freedesktop.org suggests that this is
the correct thing to do: "If any of the mimetypes resulting from a glob
match is equal to or a subclass of the result from the magic sniffing,
use this as the result." However, this does not fit perfectly to the
case of the bug report because both results come from magic sniffing.

If two rules match and have the same priority, without one being a
sub-class of the other, there is still an ambiguity. In that case we
now print a warning about the ambiguity.

The patch adds a test for the previously ambiguous case. There is no
test for the warning on ambiguity, because such a test file would be
difficult to generate and is probably not worth the effort.

Fixes: QTBUG-133221
Pick-to: 6.10 6.9 6.8
Change-Id: I1817ec4da947cd91729d0ce35defc9f63cd784d9
Reviewed-by: Mate Barany <mate.barany@qt.io>
2025-06-11 18:46:52 +02:00
Marc Mutz
fe7f01019c tst_QMetaObject: don't compare QByteArray/QLatin1StringView
This isn't needed, and actually counter-productive, because this mix
used to be ambiguous in Qt 6.5.

Amends 5c563a98a5ffe2a72a641bfa9ed30e17ecffd893.

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

Pick-to: 6.10 6.9 6.8
Change-Id: I1810f90c7cf6e3760f1d99e026b291311501c3aa
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2025-06-11 18:46:52 +02:00
Matthias Rauter
26bf2bedca Extend tests for QUtf8StringView
The existing tests were taken from tst_QLatin1StringView. This patch
adds the simple tests from tst_QStringView.

The tests fromLiteral(), fromRange() and fromContainer() are not
included in this patch.

Pick-to: 6.10 6.9 6.8 6.5
Task-number: QTBUG-132097
Change-Id: I1efc0c2d2f474f6644261575a745aa8f7e5ac4b2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-06-11 18:18:04 +02:00
Volker Hilsheimer
7ac8815a19 QRM: silence gcc warning that an array can never be nullptr
If T is a C-array, like it is in some of our tests, then an instance of
that can never be nullptr, which recent gcc versions think warrants a
compile time warning -Waddress.

As a C array is a valid data structure to instantiate a QRangeModel
from, silence that warning by handling the case explicitly.

Pick-to: 6.10
Change-Id: I63090891988e677cf3ae2d871418b1abd4d1dc71
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
2025-06-11 18:18:04 +02:00
Matthias Rauter
dd81b42127 Make include guard match its filename
Pick-to: 6.10
Change-Id: I57af3c237bddffc424cab734faa30deacaa9bcdb
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2025-06-11 16:59:46 +02:00
Laszlo Agocs
fdbc8079c9 rhi: Update the docs and manual test for geometry shaders
Task-number: QTBUG-137521
Change-Id: Ic9256eaaa55aef20c622429058fda9235c1f73c1
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2025-06-11 15:15:42 +02:00
Aaron McCarthy
7dd952667c Copy Android files from the application source in aux mode
The application provided overrides of the Android files were not being
used in aux mode. In aux mode androiddeployqt was only copying the
Android files from the Qt sources and updating them.

With this change androiddeployqt also copies the Android files from the
application source, allowing overrides prior to template processing.

Change-Id: Idf790f1c270691dab8fe093c20e84bed79bf481d
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2025-06-11 23:15:42 +10:00
Cristian Le
00a96237fd Propagate _Qt6CTestMacros in RunCMake
Propagate the `_Qt6CTestMacros` variable so that
`_qt_internal_get_cmake_test_configure_options` can be used
inside the RunCMake tests

Pick-to: 6.8 6.9 6.10
Change-Id: I2b7f3996315169d840bab3dff011927288c9782d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-06-11 09:14:06 +02:00
Tor Arne Vestbø
cdb33c3d56 macOS: Remove linkage to AGL framework
It's no longer available on macOS 26, and we don't use it anymore
anyways.

Pick-to: 6.10 6.9 6.8 6.5
Change-Id: Ia1d0e37dda177f333646e598e517f4af20215dad
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-06-10 21:17:22 -07:00
David Faure
5e971101f0 QIdentityProxyModel: avoid emitting reset in no-op setSourceModel
QSortFilterProxyModel does this exactly, it was missing in
QIdentityProxyModel.

Pick-to: 6.10
Change-Id: If14bc7a377c1ad9235dd70222e3bfbf88eef11c0
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
2025-06-11 04:08:35 +02:00
Tor Arne Vestbø
b9c77b9685 macOS: Explicitly link the platform plugin to Foundation
In the macOS 26 SDK the NSUserActivityTypeBrowsingWeb is claimed to come
from both Foundation (as in earlier SDKS), as well as CoreServices.

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

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

Reported upstream as FB17876148.

Pick-to: 6.10 6.9 6.8 6.5
Change-Id: I0c3203f92851ad9fa862aed237823f0e1e28f6ff
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-06-10 15:41:35 -07:00
Samuli Piippo
0f6c93c453 wayland: fix EGL build without x11
Amend 7c0a96785fee4fea8ef1452166b1dde88957445c and add needed
defines to fix EGL build without x11. Otherwise eglplatform.h
will try to include X11 headers.
See 4cc5428548cb8ab973e4b0281dd123d59bfaf6a0 for more details.

Pick-to: 6.10
Change-Id: I2c284219e83fecf862520a2f667d561adf4d4357
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2025-06-10 21:32:56 +00:00
Samuli Piippo
ccb854799d CMake: build QGnomePortalInterface always when DBus is available
Builds with DBus but without XCB/Wayland, failed with:
  qgnometheme.cpp:(.text+0x3ec): undefined reference to `vtable for QGnomePortalInterface'
  /usr/bin/ld: src/gui/CMakeFiles/Gui.dir/platform/unix/qgnometheme.cpp.o: in function `QGnomeThemePrivate::QGnomeThemePrivate()':

Change CMake configuration and build QGnomePortalInterface always with DBus,
except on Apple platforms, where it is not needed.

Pick-to: 6.10
Change-Id: I3fb6400d87ba08f03c30e33924c8c7d483486c3b
Reviewed-by: MohammadHossein Qanbari <mohammad.qanbari@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2025-06-10 21:32:56 +00:00
Volker Hilsheimer
1ee43844d4 Exclude MSVC version 19.44 in tst_qcheckedint and tst_qnumeric
Still causing an internal compiler error with the currently latest VC++
version.

Amends 4e3a1675793995e44f5c84f28bfdc0fd02aa27cc.

Pick-to: 6.10
Change-Id: Ia4290c9b21eb8163180d725ed200629e36e85f1f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2025-06-10 22:57:53 +02:00
Christian Ehrlicher
46c2aa2b61 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.10 6.9 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>
2025-06-10 18:30:25 +00:00
Edward Welbourne
5e9efe45df Make QTest::failOnWarning() fail also on any message type >= warning
Particularly for the no-parameter case, which fails on any warning, it
makes no sense to not also fail on a critical.

Pick-to: 6.10 6.9
Change-Id: I36f02a7dfb195616ce68babedbccc61480935fb9
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2025-06-10 20:11:54 +02:00
Edward Welbourne
dd5f409c58 Rework tst_QDate{,Time} QDataStream test to include all versions
In tst_QDate the test previously had a hard-coded list of versions by
name. This, however, needed updates on each new release (or at least
new version of QDS), which have been neglected since Qt 5.0. The
tst_QDateTime version, meanwhile, only identified versions by their
numeric value, not their symbolic names.

So borrow the way tst_QCalendar enumerates QCalendar::System, making
QDataStream a Q_GADGET and its Version a Q_ENUM to support this, to
iterate over all versions algorithmically. Apply to both data stream
tests to get a more consistent form for their data tags.

Change-Id: I04d1060cfec822cfcdc0bce6d15b636fc165fe36
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-06-10 20:11:54 +02:00
Edward Welbourne
3905d3c4df Use QMetaEnum::fromType() instead of staticMetaObject.enumerator()
The old way relied on the order of enums within the type; using
fromType() makes the enum specific.

Change-Id: I418473a6983861ca105ccc5eb249f441dbbb28cf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-06-10 20:11:54 +02:00
Tor Arne Vestbø
f67ef4934b Add QOperatingSystemVersion/QSysInfo support for macOS 26 (Tahoe)
Pick-to: 6.10 6.9 6.8 6.5
Change-Id: If6e7ee92e7c491c91a17e2730112319a132ca623
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-06-10 11:11:54 -07:00
Frédéric Lefebvre
372a8f904a Unblacklist tst_qListView::styleOptionViewItem on Ubuntu Wayland
tst_qListView::styleOptionViewItem is no longer flaky on Ubuntu
Wayland.

Fixes: QTBUG-127920
Pick-to: 6.10
Change-Id: Ia79292c283bc21bb84b3cc30a7d6c1863c8d0836
Reviewed-by: Liang Qi <liang.qi@qt.io>
2025-06-10 18:41:35 +02:00
Liang Qi
22e193e293 Unblacklist tst_qGraphicsItem::itemUsesExtendedStyleOption on Wayland
tst_qGraphicsItem::itemUsesExtendedStyleOption is no longer flaky on
Ubuntu Wayland.

Fixes: QTBUG-115293
Pick-to: 6.10
Change-Id: Ic971a13c37398bd2eaa9ccb16c10bcf62fdb8d69
Reviewed-by: Liang Qi <liang.qi@qt.io>
2025-06-10 18:41:35 +02:00
Frédéric Lefebvre
ccd7eda005 Unblacklist tst_qGraphicsItem::cursor on Ubuntu Wayland
tst_qGraphicsItem::cursor is no longer flaky on Ubuntu Wayland.

Fixes: QTBUG-127920
Pick-to: 6.10
Change-Id: Ie9096f8790bd031b642c5f5c259445859848c2f5
Reviewed-by: Liang Qi <liang.qi@qt.io>
2025-06-10 18:41:35 +02:00
Frédéric Lefebvre
e3225008cb Unblacklist tst_qPrinter::testPrintPreviewDialog on Ubuntu Wayland
tst_qPrinter::testPrintPreviewDialog is no longer flaky on Ubuntu
Wayland.

Fixes: QTBUG-127920
Pick-to: 6.10
Change-Id: Iea857db7be3ef6656667b32011009d561b92a749
Reviewed-by: Liang Qi <liang.qi@qt.io>
2025-06-10 18:41:35 +02:00
Frédéric Lefebvre
cb97b31906 Unblacklist tst_qBackingStore::flush on Ubuntu Wayland
tst_qBackingStore::flush is no longer flaky on Ubuntu Wayland

Fixes: QTBUG-127920
Pick-to: 6.10
Change-Id: I16d91ceb8854f4aee8c569c792e8cb7977cb95ca
Reviewed-by: Liang Qi <liang.qi@qt.io>
2025-06-10 18:41:34 +02:00
David Boddie
d02ac6b3e0 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.

Pick-to: 6.9 6.10
Change-Id: I72a06a7def55348bd1295e559751a16c62c93a84
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2025-06-10 16:02:28 +00:00
Petri Virkkunen
2c6be851ae Android: Support multi-arg signal generation in androiddeployqt
This commit introduces support for generating Java code for
multi-argument QML signals.

Pre-existing code remains unchanged, and the new code is only executed
when the number of params in a signal is above 1.

Multi-arg signals are handled with a new generated interface type,
named after the signal, which has a default method that takes an
Object[] array and calls the user-implemented signal method with the
arguments cast to the desired types.

For example, a QML signal with the following signature:

signal manyTypeArgSignal(intValue: int, boolValue: bool,
doubleValue: double, stringValue: string)

Is generated into this Java code:

@FunctionalInterface
public interface manyTypeArgSignalListener {
    default void onSignalEmitted(Object[] args) {
        onSignalEmitted((Integer) args[0], (Boolean) args[1], (Double) args[2], (String) args[3]);
    }
    void onManyTypeArgSignal(Integer intValue, Boolean boolValue, Double doubleValue, String stringValue);
}
public int connectManyTypeArgSignalListener(manyTypeArgSignalListener signalListener) {
    return connectSignalListener("manyTypeArgSignal", new Class[]{ Integer.class, Boolean.class, Double.class, String.class }, signalListener);
}

Task-number: QTBUG-124489
Change-Id: I94e3e88e807017bcbeba16cf0e34263e28e5885f
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2025-06-10 18:09:25 +03:00
Mårten Nordheim
8d5db24c14 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.

Pick-to: 6.10 6.9
Change-Id: I345448efd7da92f4f74033b03a5c040b5db9d271
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2025-06-10 17:09:25 +02:00
Mårten Nordheim
904aec2f37 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
Pick-to: 6.10 6.9
Change-Id: I5f2b2d5660866f1ad12aaafbb4e572b08ed5a6e4
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2025-06-10 17:09:25 +02:00
Laszlo Agocs
97fe141f25 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.10 6.9 6.8
Change-Id: I34549ce47e675d5869239b9330a166b80b40b30d
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2025-06-10 16:22:28 +02:00
Bartlomiej Moskal
21616e1447 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.10 6.9 6.8
Change-Id: Ife80898e20d4038efeae3438fb89b593bdaa056a
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2025-06-10 15:28:31 +02:00
Bartlomiej Moskal
acbcf992ee Android-Keyboard: Remove redundant code in isKeyboardHidden()
The m_keyboardIsVisible variable already reflects the current
keyboard visibility state. This commit simplifies the
isKeyboardHidden() method by using it directly, removing
unnecessary logic.

Task-number: QTBUG-98984
Pick-to: 6.10 6.9 6.8
Change-Id: I6bba90e6fbfb1191415e7ee812517ca15ac1c937
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2025-06-10 15:28:31 +02:00
Bartlomiej Moskal
33cf82c13d 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.10 6.9 6.8
Change-Id: I40f3ccc4e652f1ae0c6c0ebd154d690d1a9d7ca8
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2025-06-10 15:28:31 +02:00