Commit Graph

59373 Commits

Author SHA1 Message Date
Yuhang Zhao
3034d698eb Windows QPA: remove long-time dead code
It has been commented out since at least 5.3 (the earliest version
hosted on the GitHub mirror), so it seems this code is not used
by anyone for more than 10 years. We can safely remove them.

Change-Id: Ia475ce5a5fdd6db48f415b3647677a35c79bfc5d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2022-12-17 20:34:31 +08:00
Marc Mutz
ba52b29d33 QLatin1/String/View: don't decay the arg() arguments
This turns const char[] arrays into const char* pointers and
therefore prevents the implicit conversion of string literals
to QString in QT_RESTRICTED_CAST_FROM_ASCII.

Fix by avoiding the decay.

Also simplify the template magic.

Pick-to: 6.5 6.4 6.2 5.15
Change-Id: I88164a1866ac71b41d9cd1564f3a5e83d2d42aaa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-17 07:18:07 +00:00
Juha Vuolle
67d7d8746c Fix minor permission doc typo
Pick-to: 6.5
Change-Id: I4af4f2859940bd121cdd0a42eab52f94f3cbc673
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-12-17 00:38:23 +02:00
Axel Spoerl
5edb71c6d4 Fix QWidget::restoreGeometry when restored geometry is off screen
If a widget's geometry is restored to a screen, which is smaller than
the one it was saved from,
- the widget could appear (partly) off screen
- the widget's title bar and resize handles could be inaccessible

This patch refactors and documents checkRestoredGeometry.
In a first step, the restored geometry's size is checked against
a given screen size. It is corrected if necessary.
In a second step, the restored geometry is moved inside the screen,
if necessary.
It makes the function a static member of QWidgetPrivate in order to
expose it for auto testing and adds a respective test function to
tst_QWidget.

Fixes: QTBUG-77385
Fixes: QTBUG-4397
Task-number: QTBUG-69104
Pick-to: 6.5 6.4
Change-Id: I7172e27bfef86d82cd51de70b40de42e8895bae6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-12-16 22:58:11 +01:00
Marc Mutz
4ccb10dc91 QXmlStreamWriter: fix a thinko in doWriteToDevice(QSV)
Check for state.remainingChars to signal an encoding error only after
the last chunk has been processed. Splitting surrogates at chunk
boundaries is normal operation, not an error. Only if this happens at
the end of the whole input should we raise an error.

Amends fa2153bd10.

Pick-to: 6.5
Change-Id: Id92e37becaed25bbc11e0c22dedc4d41fb23f92a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-12-16 22:58:11 +01:00
Marc Mutz
26c190f57e QTest::WatchDog: fix missing timeout resets on test function change
Since e0cad1aab5, the code suffered
from an ABA problem where the TestFunctionStart expectation is set
in testFinished(), but by the time WatchDog::run() gets around to
examining the state when returning from condition_variable::wait()
in waitFor(), the next beginTest() has already set the expectation
back to TestFunctionEnd.

There are several known solutions for ABA problems. Embedding a
generation count into the expectation state seemed to be the most
straight-forward fix, and can be done without DWCAS support, because
the state is just 2 bits, leaving the other 30 or 62 bits for the
generation counter, so do that.

[ChangeLog][QTestLib] Fixed a bug which caused
QTEST_FUNCTION_TIMEOUT to be applied to the whole test execution,
as opposed to each test function.

Fixes: QTBUG-109466
Pick-to: 6.5 6.4 6.2 5.15
Change-Id: If71ade932330407b85d204d45c74350c651325fe
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-12-16 22:58:10 +01:00
Marc Mutz
17a7e5cfdd QTest::WatchDog: Extract Method setExpectation()
Keeps the code DRY and enables a follow-up commit to fix QTBUG-109466.

Task-number: QTBUG-109466
Pick-to: 6.5 6.4 6.2 5.15
Change-Id: I2b904ea7b38286b07049524ba63c2c5028e680bb
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-12-16 22:58:10 +01:00
Marc Mutz
6b5419f435 Extend tst_qxmlstream::readBack() to all Unicode characters
... not just those in the BMP.

The use of char32_t makes the isValid helper function easier to
read. Its passing to write() is enabled by the recent port to
QAnyStringView, which has a char32_t ctor.

Split into per-plane executions of the test function to avoid
running into timeouts on asan builds down the road.

As a drive-by, replace use of QPair with a proper struct, and
make the intervals symmetrically inclusive the bounds.

Pick-to: 6.5
Change-Id: I2c6858d7e6a88f448eac1b1e124d7d7b82828d4c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-12-16 22:58:10 +01:00
Mikolaj Boc
8f04c50cff Fix event dispatching on WASM
1) Check only for the events that the dispatcher is able to process,
otherwise it enters an endless loop
2) Take care to run the correct wake up callback with
Asyncify.handleSleep

Fixes: QTBUG-109066
Change-Id: I10d29d18962c3e438e56712e1f43ecadedb6205c
Pick-to: 6.5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-12-16 19:51:11 +00:00
Andy Shaw
eac9f39517 SQLite: Update SQLite to v3.40.0
[ChangeLog][QtSQL][SQLite] Updated SQLite to v3.40.0

Pick-to: 5.15 6.2 6.4 6.5
Change-Id: I7beb0bc9c1256f273d6011567c5ef3975ada5060
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2022-12-16 18:29:10 +00:00
Tor Arne Vestbø
dd49793bc3 iOS: Don't assume screens will not be connected before QIOSIntegration
When an external screen is connected to an iPad, and the application is
starting up on that screen, we will get a connection notification about
that screen as part of the initial bootstrap of UIApplicationMain,
before we call the user's main().

Since we initialize and add all available screen on QIOSIntegration
creation, we can just ignore the early connection notification.

This avoids a crash, but the window will not show anything on the
external screen, which is a separate issue.

Pick-to: 6.5 6.4 6.2
Fixes: QTBUG-106701
Change-Id: I9e0a9736bf602277316bd004e0d01c640feaf319
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-12-16 19:29:10 +01:00
Thiago Macieira
686c02224c QUuid: add the ability to specify the byte order for 128-bit IDs
Some more modern protocols like Bluetooth LE transmit data in little
endian. QtBluetooth will benefit from this.

Change-Id: Id8e48e8f498c4a029619fffd1728c94ddd444537
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-12-16 19:29:10 +01:00
Thiago Macieira
0f932b9a5d QUuid: add a trivial structure to support exactly 128 bits
This is inspired by QBluetoothUuid's quint128, but with a better
name. It also matches systemd's sd_id128.

Change-Id: Id8e48e8f498c4a029619fffd172893dc1545adda
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-12-16 19:29:09 +01:00
Thiago Macieira
c3c5d2cab0 QUuid: use NSDMI to initialize the members
Change-Id: Id8e48e8f498c4a029619fffd172893c31bb0aba1
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-12-16 10:29:09 -08:00
David Skoland
047c0f0060 wasm: Always use basic password-store=basic in tests
This makes sure the browser only uses a basic password store and
doesn't try to do anything fancy with the OS pass store, since it
causes an issue on opensuse (kwallet isn't set up in CI).

Change-Id: Ib48a15f4834fa9bb26cf8cf3fff9bb4d0fd0238a
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-12-16 19:29:09 +01:00
Laszlo Agocs
4d36a83b6d rhi: vk: Fix up some legacy queue (family) index inconsistencies
Relevant mainly if we want to consistently expose these as the
theoretically correct uint32_t/quint32 from Qt Quick's
QSGRendererInterface. (not that int is not sufficient for
indexing the typical 3-4 families and 2-16 queues per family)

Some checks are not actually needed since the family index
must always be valid after create().

Pick-to: 6.5
Task-number: QTBUG-108895
Change-Id: I474ccea51a81e7a096281604ff79b7db4cdd2484
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2022-12-16 17:49:28 +00:00
David Edmundson
c7425aa295 dbus: Fix path to moc file in generated qdbusxml2cpp
qdbusxml2cpp takes a filename to use for generated output. It may be in
the form 'name.cpp' or just 'name'.

For the moc file we need to convert this from a path to a name of a file
in the same relative folder. It's not uncommon for this name to contain
dots as sometimes a dbus interface name is used directly.  For the cases
where a suffix is not provided the whole name should be used.

Pick-to: 6.5
Change-Id: I3bf4ae8b2b9121184c2786009e8b5abcc5e3e410
Reviewed-by: Mate Barany <mate.barany@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-12-16 17:21:57 +00:00
Marc Mutz
7d0f08094a tst_qxmlstream: swap WHEN and THEN in readBack()
WHEN writing an invalid character, THEN we expect the writer to report
an error.

The old code had it the wrong way around. It checked that WHEN the
writer reports an error, THEN the character was invalid.

The formulations are equivalent, but the latter is mixing up cause and
effect, making it less clear what's being checked (QXmlStreamWriter,
not isValidSingleTextChar()), so swap.

Pick-to: 6.5 6.4 6.2
Change-Id: I703de9ddde98d9913977a913f671472930735900
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Mate Barany <mate.barany@qt.io>
2022-12-16 18:21:57 +01:00
Marc Mutz
7fa6670fa4 tst_qmlstream: re-use QBuffer instance in readBack()
This improves the runtime of this particular test function by
almost 17% on my machine.

Pick-to: 6.5 6.4 6.2 5.15
Change-Id: Icd77cdda92374b92121988c99e56787d405fa2d9
Reviewed-by: Mate Barany <mate.barany@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-12-16 18:21:57 +01:00
Timothée Keller
f8a9047c9c Windeployqt: add missing module and plugin
Added the QtOpcUa module, as well as the relevant opcua plugin

Fixes: QTBUG-109336
Pick-to: 6.4
Change-Id: I5edd886e6224de14cd2b68727655c64514ef5158
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2022-12-16 18:21:57 +01:00
Joerg Bornemann
8f2d5a5649 CMake: Enforce QT_RESOURCE_ALIAS for absolute paths in resources
For Qt resources, enforce QT_RESOURCE_ALIAS for source files that are
specified with absolute paths.

Users can add generated files to resources, e.g. in
qt6_target_qml_sources or qt6_add_qml_module. The file paths of those
generated files are typically absolute paths.

The function __qt_get_relative_resource_path_for_file is used to
construct file paths in the build directory. For the files in question,
this function returned an absolute file path. This led to very long
subdirectories within the build directory and even invalid paths on
Windows.

We cannot guess how the user intends to address the file via the
resource system and require now that QT_RESOURCE_ALIAS is set on such
files.

[ChangeLog][CMake] In Qt resources, files that are specified as
absolute paths must have the property QT_RESOURCE_ALIAS set.

Task-number: QTBUG-108150
Change-Id: Ida092c3d103a243caffc869b4bb887d4b5ce70ab
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-12-16 18:21:57 +01:00
Shawn Rutledge
b3750e815f Add eglfs touch logging in qt.qpa.input.events
We have this logging category on xcb and ios already.

Task-number: QTBUG-103620
Pick-to: 6.5
Change-Id: I70153c4ea9d62316d0e05550559010d85e2f9d85
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2022-12-16 17:21:57 +00:00
Thomas Senyk
6160635c9d Remove QEglFSCursor's inheritance of QOpenGLFunctions
As QOpenGLContext can be destroyed
it's a bad idea to store QOpenGLFunctions
(which are QOpenGLContext bound)

This change remove the inheritance and replaces it with
querying the functions per call.

Pick-to: 6.5 6.4 6.2
Change-Id: I2f3104b62f395f3e65337a15d0a0835383b66e16
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2022-12-16 18:21:57 +01:00
Mikolaj Boc
b53dcb4e67 Treat the accessible non-editable combobox as ButtonMenu on macOS
Following the system design, we should treat the non-editable combobox
as a ButtonMenu. All of the similar elements in macOS's UI are called
ButtonMenu with the screen reader.

This fixes the case when ctrl+option+space does not invoke the popup
menu with options.

Fixes: QTBUG-106162
Change-Id: I0b439c56d72d1fe5b32a60eb7c001f863c00adc1
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-12-16 18:21:57 +01:00
Ville Voutilainen
c672f148db Skip QProcess tests when run under ASan
These tests exhibit weird crashes when run under ASan, but sometimes
they fail sometimes they don't. Pending more insight, just skip this
test under that configuration.

Fixes: QTBUG-109329
Change-Id: I49d940de419f7166aab0da0b8c2b44297c4b6d74
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-16 19:21:56 +02:00
Thiago Macieira
5bdf03798d XCB: use qOffsetStringArray
This is the last string array I can see in qtbase sources for libraries
(there are more in tests and qmake, which don't matter much).

Pick-to: 6.4 6.5
Change-Id: I69ecc04064514f939896fffd1731046cebdfe3c9
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-12-16 14:21:56 -03:00
Marc Mutz
8602a224b6 QT_INLINE_SINCE: never inline for static Qt builds
Static Qt builds are not covered by BC guarantees, but since all
'libraries' are linked into a single executable, we face in all users
of the library the same ODR violation that we faced within the
implementation DLL: we can't define the same symbol as inline in some
TUs and out-of-line in others.

In the past, we decided to always inline in static builds, but that
breaks users which, by Hyrum's Law, have come to depend on the
non-existent BC guarantees for static Qt builds.

By switching to never inline¹ in static builds, we restore BC for such
users. The performance issues should be minimal, since LTO will anyway
inline whatever it wants, independent on how it was declared.

¹ except when the deprecation point has passed over the Qt version the
  API was inlined (-disable-deprecated-up-to configure switch).

[ChangeLog][QtCore] Restored binary compatibility for static Qt
builds broken by the QT_INLINE_SINCE mechanism. Qt still does not
guarantee BC for static build configurations otherwise.

Fixes: QTBUG-109449
Pick-to: 6.5 6.4
Change-Id: Ie3fa62621b74dc5e9dac301b9882c0e3c3999eaf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-12-16 17:21:56 +00:00
Laszlo Agocs
8e5806b680 rhi: metal: Use scale from the layer we already have
...so that we do not need to call devicePixelRatio() again, which means
one less UI Thread Checker warning in Xcode.

Pick-to: 6.5
Task-number: QTBUG-97518
Change-Id: I01d54ea113788cd0b141e124a47940f5cd3efabb
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-12-16 14:16:02 +01:00
Jan Grulich
0657b0734e Add QCryptographicHash::supportsAlgorithm() to check supported algorithm
Adds QCH::supportsAlgorithm() method which returns whether the selected
algorithm is supported and we guarantee to get a result when generating
hashes. OpenSSL will be responsible for providing us this information.
Returns TRUE if OpenSSL is not used as a provider.

[ChangeLog][QtCore][QCryptographicHash] Add supportsAlgorithm() method
that can be used to query OpenSSL and check whether the selected
algorithm is supported.

Pick-to: 6.5
Change-Id: I0d94e02b8c70beb79520150fab6c32bdd1da3fca
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-12-16 14:10:46 +01:00
Axel Spoerl
2c9b7a986d Fix checkbox and radiobutton background in QGtk3Theme
The background color for radio buttons and checkboxes was not
correctly read from the current GTK3 theme in light mode.
This has lead to identical colors for indicators and background of
radio buttons and checkboxes for certain GTK themes (e.g. Breeze).

This patch sets the GTK default foreground color to the base color of
palettes for checkboxes and radio buttons.

Fixes: QTBUG-109454
Pick-to: 6.5
Change-Id: Ic227029f2d366aa826e7bf1c3870428e3b638638
Reviewed-by: Jonas Kvinge <jonas@jkvinge.net>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-12-16 13:41:09 +01:00
Kai Köhne
2acd007859 CMake: Fix AUTOMOC warning in QtGui
Fixes warning
  AutoMoc: C:/dev/qt/dev/src/qtbase/src/gui/kernel/qplatformwindow_p.h(0:1): note: No relevant classes found. No output generated.
on Windows

Pick-to: 6.5
Change-Id: Ib3ebec15dca419386f75a91c576930a65bc30d80
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-12-16 11:40:14 +01:00
Yuhang Zhao
e86a5f5f8b GTK3 theme: simplify code
There's no need to first convert to QString and then convert back to
QByteArray.

Pick-to: 6.5 6.4 6.2 5.15
Change-Id: Idedcf3143f44c640a9259f16e364dfe76ecf4c0d
Reviewed-by: Liang Qi <liang.qi@qt.io>
2022-12-16 03:37:56 +00:00
Yuhang Zhao
4e52a4c7e3 Cleanup QWizard Windows implementation
Since DWM composition is now always enabled and can't be disabled,
The code for VistaBasic style is now dead code in reality, just remove
them.

Change-Id: Iab2ba9b11ed573b240814ab5e26dec656de42ed2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-12-16 11:37:45 +08:00
Peter Varga
97b32fa0b6 Fix clang-cl compiler warnings
- known but unsupported action 'shared' for '#pragma section'
  [-Wignored-pragmas]
- #include resolved using non-portable Microsoft search rules
  [-Wmicrosoft-include]
- variable is used uninitialized whenever switch default is taken
  [-Wsometimes-uninitialized]

Change-Id: I466352ff97a2bcf07e706c045568e581dd08a94e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-15 23:16:04 +01:00
Peter Varga
702ffc45d6 Fix clang-cl build with disabled x86 intrinsics
clang-cl's intrinsics support is broken, it doesn't declare the AVX2
intrinsics if they are disabled and this doesn't match GCC or MSVC
behavior: https://github.com/llvm/llvm-project/issues/53520

This fix allows to disable x86 intrinsiscs during configuration of
clang-cl build.

clang-cl build is still not guaranteed to work with enabled x86 intrinsics.

Change-Id: Icd295f6b4d868adf10bcd425d5280c56b43cb9f7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-15 23:16:04 +01:00
Yuhang Zhao
514a6cb7dc Vista style: remove temporary workaround
The MinGW issue has been fixed some time ago.

Change-Id: Ie2eaa2952d398a913b06d36d7e621efff9e4c926
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-12-16 05:12:50 +08:00
Alexandru Croitor
5fe52a0420 qmake: Document that QMAKE_PRE_LINK does not work with Xcode
When generating an Xcode project using qmake that's targeting the new
Xcode build system, QMAKE_PRE_LINK does not work properly.
It generates rules that conflict with the default linker rules.
This is a limitation of the new Xcode build system which does not have
any known workaround.

Document the limitation.

Pick-to: 5.15 6.2 6.4 6.5
Fixes: QTBUG-99601
Change-Id: Ie4e6bcb0603ced85f786e9f7f407172e84a00d83
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-12-15 20:23:28 +01:00
Alexandru Croitor
b43a39977b CMake: Deprecate some android public APIs
Deprecate usage of:
 - qt_android_add_apk_target
 - qt_android_apply_arch_suffix
 - qt_android_generate_deployment_settings

when used by user projects directly. Instead, projects should use
qt_add_executable / qt_add_library.

Show a deprecation warning when the commands are used directly.
The deprecation warnings can be silenced using cmake's
-Wno-deprecated command line option.

To detect non-direct usage from inside our own function
implementations, we set some target properties which are then read to
decide whether to show the message.

Pick-to: 6.5
Fixes: QTBUG-108508
Change-Id: Ib039cc5f3a01c2276173abb1e43f4eed216d0170
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-12-15 20:23:28 +01:00
Alexandru Croitor
5e00c0c5e5 CMake: Remove direct qt_android_generate_deployment_settings call
in our tests.

They are not needed anymore since
d20f4ae706 got merged and the
QT_ANDROID_PACKAGE_SOURCE_DIR property is read at generation time
rather than configure time.
This means the
qt_internal_add_test ->
qt_internal_add_executable ->
_qt_internal_android_executable_finalizer ->
qt_android_generate_deployment_settings
calls take care of generation the right value for the property even
with CMake 3.16.

Remove the direct qt_android_generate_deployment_settings calls,
in preparation for their deprecation in public api.

Pick-to: 6.5
Task-number: QTBUG-88506
Task-number: QTBUG-88840
Task-number: QTBUG-108508
Change-Id: Ief1d0f9f620bd37beeedde26dedb66f728fa4a6f
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-12-15 20:23:28 +01:00
Jan Grulich
1fe74c3bd3 QCryptographicHash: clear the result in QCH::reset() when using OpenSSL
OpenSSL implementation did not clear the previous result when
calling QCH::reset(). This could lead to not generating new hashes.

Pick-to: 6.5
Change-Id: Ic83e6382038a2f8808af950b88e57316b90ef2bc
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-12-15 19:23:28 +00:00
Doris Verria
ce20b81070 iOS File Dialog: Support setting name filters
Fixes: QTBUG-93624
Pick-to: 6.5
Change-Id: I2e1b522d572fd36f58a3de90f0a685f5d22dfeeb
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-12-15 19:23:28 +00:00
Mårten Nordheim
3ff8629a0f Schannel: Don't emit error when peer performs graceful disconnection
Pick-to: 6.5 6.4
Change-Id: Ie19a31fc61223d954badc704324adf4f5f7d361e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-12-15 19:23:28 +00:00
Mikolaj Boc
b13405bb34 Always target the web events at the currentTarget
Otherwise, when the event bubbles, all of the events are targeted
at the 'target', which is not the behavior we observe in browsers.

For an event, the following should happen:
- Targeting phase (we don't use this for firing events)
- The found target should have its event handler fired
- If the event's propagation is not prevented, it should bubble.
All of the element's parent elements should get a chance to handle the
event. These are called 'currentTarget' and this is therefore the
actual element we should run the callback on.

Change-Id: I6bf8903431c6dea3097a4582acad22c9a4f12469
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-12-15 18:31:51 +01:00
Tor Arne Vestbø
095604c9af iOS a11y: Ensure parent elements are stacked below their children
The accessibility system on iOS does not support elements that are both
accessible themselves, and act as a container for other elements. You
either return YES from isAccessibilityElement, which allows you to
report accessible properties for the element, or NO, in which case
you can implement the informal UIAccessibilityContainer protocol
to report child elements. This was confirmed in Apple Q&A session
on accessibility December 14.

As Qt's accessibility system allow elements that are both containers
and have properties of their own, we can't build a hierarchy of elements
and containers, with only the leaf elements being accessible. Instead,
we let each UIView act as a UIAccessibilityContainer, and report the
entire child hierarchy as a single level of sibling accessible elements.

In doing so, we include elements such as the Window or Dialog that
root all the accessible elements. And apparently the order that we
report these elements back to iOS determine the z-order of the
elements, so we need to ensure "container" elements are behind
their children. Otherwise assistive technologies such as Voice Control,
or the Accessibility Inspector, will not be able to target the child
elements.

Fixes: QTBUG-108848
Pick-to: 6.2 6.4 6.5 5.15
Change-Id: I5234bab2f14d5f368ae8c2672b051efcb80aa77d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-12-15 18:31:51 +01:00
Volker Hilsheimer
f2b49789b2 QJniObject: fix binary compatibility breakage
Amends 601dbd6499, which changed the
signature of the private callVoidMethodV function. However, that
function got called in a public template member function, so callsites
depended on the private function to be present. By changing the function
signature, we broke binary compatibility.

Bring the original function back and implement the variadic overload
through it.

Fixes: QTBUG-109428
Pick-to: 6.4 6.5
Change-Id: Ie2297e120fbeb146089c0fbe8f91f8b8d3c79713
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-12-15 17:52:26 +01:00
Eskil Abrahamsen Blomfeldt
8892819d0c windows: Fix vertical metrics with GDI engine
In Qt 6 we consolidated vertical font metrics across all
platforms (see f761ad3cd9
and follow-ups). However, a couple mistakes were made.

First of all, when we use the winAscent/winDescent values
from the OS/2 table, we would also set the leading to the
line gap value from the HHEA table. However, the line gap
is actually built into the winAscent/winDescent, so we
ended up adding this twice to the line spacing, increasing
it with some older fonts. When using the Windows legacy
metrics, we now set the line gap to 0 instead to reflect
that this is baked into the height.

In addition, since we now calculate the values ourselves,
we would not round them to nearest integer like the GDI
engine does. We now round these values to make it clear that
the GDI engine does not support any fractional metrics.

[ChangeLog][Windows][Text] Fixed an issue where the line
gap of some fonts would be included twice in the font's
leading.

Pick-to: 6.5 6.4 6.2
Fixes: QTBUG-109400
Change-Id: I02ab7447b5e82d9f4474f9bca581f82acee85ff3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
2022-12-15 17:52:26 +01:00
Mårten Nordheim
bdee7becf6 Export QAuthenticatorPrivate for use in QtWebSockets
Change-Id: I0e3e35d2b9d0fdce37ede5781b86741f7604257d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-12-15 17:52:26 +01:00
Ahmad Samir
7566c7381d QFileSystemEngine/Unix: use chrono for time related arithmetic
Change-Id: I1647c6ab44ec5c3569411cca88738746e44cc4b2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-15 12:44:26 +02:00
Paul Wicking
8165750af8 Document max size for QFont::setPixelSize
Pick-to: 6.5 6.4 6.2
Fixes: QTBUG-102989
Change-Id: I9a63a2ab8ac6eadf1b5a5865a0a084700d9e85d2
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-12-15 06:39:54 +01:00
Ben Fletcher
509fd9f2bb RHI: Buffer readback fixes and unit test
Fixes issues with readback of storage buffers modified on GPU for D3D
and Metal.  Adds unit test for storage buffer readback.

D3D
*  Fixes issue where QRhiBufferReadbackResult::completed callback could
be called twice on buffer readback completion.

Metal
* Fixes issue where buffer readback occurred prior to command buffer
being committed.

Change-Id: If55ac005f4438d66d2f65ea2e1ee0d5686c884ff
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2022-12-14 17:29:53 -08:00