Commit Graph

60379 Commits

Author SHA1 Message Date
Ievgenii Meshcheriakov
07b8a5a409 pingpong example: Modernize the code
Use qWarning()/std::cout instead of C IO functions.

Use default parameters for QDBusInterface's constructor.

Remove useless Q_SCRIPTABLE.

Use type-safe invokeMethod().

Extract a local variable for the used D-Bus connection.

Task-number: QTBUG-111366
Pick-to: 6.5
Change-Id: Idc38a7c1dd97d71308d9491193039744c759d6f2
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-02-28 18:15:24 +01:00
Amir Masoud Abdol
38ee9ee849 Avoid resetting CMAKE_AUTOMOC_MACRO_NAMES
Instead of overwriting the CMAKE_AUTOMOC_MACRO_NAMES, we try to append
our desired moc names to it, and don't get rid of what's there.

Thanks for Friedrich W. H. Kossebau for filling a descriptive bug report
and offering a solution as well.

Pick-to: 6.5 6.4 6.2
Fixes: QTBUG-110497
Change-Id: I582af431151cacfe24085b890ae9dba0a0e53f3f
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-02-28 18:15:24 +01:00
Andy Shaw
8f33a0424f SQLite: Update SQLite to v3.41.0
[ChangeLog][QtSQL][SQLite] Updated SQLite to v3.41.0

Fixes: QTBUG-111539
Pick-to: 5.15 6.2 6.4 6.5 6.4.3
Change-Id: Ia90939bf57222a290fe7bcb3741013c2576eec13
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-02-28 17:15:24 +00:00
Jan Arve Sæther
afbfe30093 a11y: Test and document relations better
The documentation for the RelationFlag enum was not very clear on what
was the "first" and "second" object.
And the fact that the AT-SPI backend (which these enum values originates
from) inverses "first" and "second" makes it harder to understand what
how it all fits together.

So when (with this change) Qt documents 'QAccessible::Labelled' as
    "The returned object is labelled by the origin object"

AT-SPI documents ATSPI_RELATION_LABELLED_BY as:
    "The origin object is labelled by the returned object"
(Documentation for AT-SPI is rewritten so that it shares the same
terminology)

Notice that the two objects are exchanged, which means that even if they
use the same 'Labelled' relation, the semantic gets 'inversed'.

This is already the case today, so we cannot change it. Therefore, to be
clear, the relation mapping will remain to be like this:

Qt Relation     | Maps to AT-SPI                | Qt explanation
----------------+-------------------------------+--------------------------------------------------------------------------------
Label           | ATSPI_RELATION_LABELLED_BY    | The returned object is a Label for the origin object
Labelled        | ATSPI_RELATION_LABEL_FOR      | The returned object is Labelled by the origin object

Controller      | ATSPI_RELATION_CONTROLLED_BY  | The returned object is the Controller for the origin object
Controlled      | ATSPI_RELATION_CONTROLLER_FOR | The returned object is Controlled by the origin object

This mapping can already be seen in qAccessibleRelationToAtSpiRelation()

For the record, these future relations should then be mapped to like
this:

Qt Relation     | Maps to AT-SPI                | Qt explanation
----------------+-------------------------------+--------------------------------------------------------------------------------
Described       | ATSPI_RELATION_DESCRIPTION_FOR| The returned object is described by the origin object
DescriptionFor  | ATSPI_RELATION_DESCRIBED_BY   | The returned object provides a description for the origin object

FlowsTo         | ATSPI_RELATION_FLOWS_FROM     | The returned object has content which flows logically to the origin object
FlowsFrom       | ATSPI_RELATION_FLOWS_TO       | The returned object has content which flows logically from the origin object

Change-Id: Ib245ec95564e4886dc6dbbb68abec2b23cd0e534
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-02-28 17:53:10 +01:00
Morten Sørvig
50057fec93 wasm: use emscripten::ProxyingQueue
Use ProxyingQueue for proxing calls from secondary threads
to the main thread. This replaces the previous usage of the
private emscripten_async_run...() API.

Keep the existing "trampoline" which in addition proxies
using a JavaScript zero timer. This makes sure that
the proxied call is made with a clean stack, and not
e.g. while the main thread is waiting on a mutex.

Change-Id: I66cfdc2cf4bc733b1732973677c2ae46d85c8e7c
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
2023-02-28 17:53:10 +01:00
Kristoffer Skau
55568b8c62 Increase cache size for QOpenGLTextureCache
Currently images that does not fit in the cache will be destroyed, which
is unfortunate. 256 MB cache is too small for todays standards, so
increasing it to 1 GB. Also adding an environment variable so that it is
changeable if required.

Fixes: QTBUG-111498
Pick-to: 6.5
Change-Id: I70c65cad6219a59102b16abc50f098aa0b017314
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2023-02-28 17:53:10 +01:00
Amir Masoud Abdol
b6bc4199ec Align qt_internal_add_manual_test with qt_internal_add_test
They now share their implementation. Manual tests can be created by
passing the MANUAL arguments to the qt_internal_add_test as well.

Pick-to: 6.5
Fixes: QTBUG-111382
Change-Id: I1c207b7e4a67526554df1ee43fe032bb20fc92fa
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-02-28 17:53:10 +01:00
Marc Mutz
45c096a543 QXmlStreamWriter: hold the indent in std::string, not QByteArray
This means that, thanks to std::string's SSO, we won't allocate to
hold the indent step string anymore, at least for non-pathological
indents of up to 15-23 characters, depending on the particular
std::string implementation.

Task-number: QTBUG-103302
Change-Id: I63685619e86a3aa7bcfac41db84f64a78859bdb7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-02-28 16:53:10 +00:00
Andreas Eliasson
8ecd81ae86 Doc: Remove duplicate words
Change-Id: Ia7a38a1035bd34d00f20351a0adc3927e473b2e7
Pick-to: 6.5 6.4 6.2
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2023-02-28 16:53:10 +00:00
Mårten Nordheim
ee1651efdd QtConcurrent: yield CPU when spinning on atomics
Pick-to: 6.5
Change-Id: I3eef19d8737da60bee40385a64a1bc136d2e7329
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-28 16:49:42 +01:00
Mårten Nordheim
97dcf1ba18 Fortune* Example: update screenshots
Fixes: QTBUG-108875
Pick-to: 6.5
Change-Id: Ib57482959973815681b0b178acea3634a4f63220
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-02-28 16:33:05 +01:00
Laszlo Agocs
6462a454e3 Remove threadeqopenglwidget example
It is neither documented nor very useful, and it has
platform-specific issues as reported over the years.

Remove it now as part of the example revamp initiative.

Task-number: QTBUG-50278
Task-number: QTBUG-110093
Task-number: QTBUG-76054
Task-number: QTBUG-43209
Pick-to: 6.5
Change-Id: I6dadaf4162b4c19411c544b9f204c19e37aa740d
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2023-02-28 14:28:51 +01:00
Jan Grulich
86a517ac78 Fix QCH:supportsAlgorithm() result for unsupported hashes in OpenSSL
OpenSSL doesn't support some Blake2s and Blake2b hashes and querying
these would automatically report that they are unsupported, while we are
actually using non-OpenSSL implementataion for these and therefore they
are always supported.

Pick-to: 6.5
Change-Id: I300694459891c3103502705d6c8271caa47d8d01
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-02-28 08:40:05 +01:00
Qt CI Bot
5c5440338f Merge integration refs/builds/qtci/dev/1677513858 2023-02-27 18:26:05 +00:00
Volker Hilsheimer
f5105ea89a QStyleSheet: never treat styled scrollbars as transient
If a style sheet is applied to a scrollbar, then we cannot treat it as
transient, as the QStyleSheetStyle doesn't implement any fade-in/out
animation logic. And we also need to set the overlap to 0 (in both
the style sheet and the macOS style) if the scrollbars are not
transient; otherwise the opaque scrollbar will be placed on top of the
content.

Since a style sheet might only apply to a scrollbar based on its
orientation, we also have to pass the style option through to all calls
of the styleHint function.

And since that function is also called from other QStyle implementations
in the macOS style, we have to make sure that we call styleHint() on the
widget's style to get the correct value based on the style sheet.

Fixes: QTBUG-63381
Pick-to: 6.5 6.4 6.2
Change-Id: Ic67ce3a7cb5089f885dabfd5a1951e3029915446
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-02-27 19:26:05 +01:00
Volker Hilsheimer
519e3963fa QtGui: Use single precision for mouseMove detection
QGuiApplication::lastCursorPosition is a QPointF, and (at least on macOS)
compares always different from the QPointF stored in the event. This
might be due to the translation from system coordinates to QPointF
introducing noise.

The result is that even a simple button press causes mouseMove events
to be delivered.

To prevent this event noise, overload equality operators for the special
QLastCursorPosition type when comparing with QPointF to explicitly use
single precision comparison.

Pick-to: 6.5 6.4 6.2
Fixes: QTBUG-111170
Change-Id: I82ea23ac9f4fa80c55c9c5c742527dd7ee74fd99
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-02-27 19:26:05 +01:00
Ben Fletcher
cd2d626b8b rhi: Add support for half precision vertex atttributes
Runtime support is indicated via QRhi::Feature::HalfAttributes.

OpenGL support is available in OpenGL 3.0+, OpenGL ES 3.0+, and in
implementations that support the extension GL_ARB_half_float_vertex.

Other RHI backends (Vulkan, Metal, D3D11, and D3D12) all support this
feature.

Note that D3D does not support the half3 type.  D3D backends pass half3
as half4.

tst_qrhi auto unit test included.

Change-Id: Ide05d7f62f6102ad5cae1b3681fdda98d52bca31
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-02-27 09:31:07 -08:00
Ben Fletcher
3b997835e1 rhi: Add support for half precision vertex atttributes
Runtime support is indicated via QRhi::Feature::HalfAttributes.

OpenGL support is available in OpenGL 3.0+, OpenGL ES 3.0+, and in
implementations that support the extension GL_ARB_half_float_vertex.

Other RHI backends (Vulkan, Metal, D3D11, and D3D12) all support this
feature.

Note that D3D does not support the half3 type.  D3D backends pass half3
as half4.

tst_qrhi auto unit test included.

Change-Id: Ide05d7f62f6102ad5cae1b3681fdda98d52bca31
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-02-27 09:29:34 -08:00
Ben Fletcher
248ac343f1 rhi: Add support for half precision vertex atttributes
Runtime support is indicated via QRhi::Feature::HalfAttributes.

OpenGL support is available in OpenGL 3.0+, OpenGL ES 3.0+, and in
implementations that support the extension GL_ARB_half_float_vertex.

Other RHI backends (Vulkan, Metal, D3D11, and D3D12) all support this
feature.

Note that D3D does not support the half3 type.  D3D backends pass half3
as half4.

tst_qrhi auto unit test included.

Change-Id: Ide05d7f62f6102ad5cae1b3681fdda98d52bca31
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-02-27 09:28:11 -08:00
Ben Fletcher
479d17f7a9 rhi: Add support for half precision vertex atttributes
Runtime support is indicated via QRhi::Feature::HalfAttributes.

OpenGL support is available in OpenGL 3.0+, OpenGL ES 3.0+, and in
implementations that support the extension GL_ARB_half_float_vertex.

Other RHI backends (Vulkan, Metal, D3D11, and D3D12) all support this
feature.

Note that D3D does not support the half3 type.  D3D backends pass half3
as half4.

tst_qrhi auto unit test included.

Change-Id: Ide05d7f62f6102ad5cae1b3681fdda98d52bca31
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-02-27 09:26:58 -08:00
Ben Fletcher
70e0d9164d rhi: Add support for half precision vertex atttributes
Runtime support is indicated via QRhi::Feature::HalfAttributes.

OpenGL support is available in OpenGL 3.0+, OpenGL ES 3.0+, and in
implementations that support the extension GL_ARB_half_float_vertex.

Other RHI backends (Vulkan, Metal, D3D11, and D3D12) all support this
feature.

Note that D3D does not support the half3 type.  D3D backends pass half3
as half4.

tst_qrhi auto unit test included.

Change-Id: Ide05d7f62f6102ad5cae1b3681fdda98d52bca31
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-02-27 09:25:55 -08:00
Ben Fletcher
2f216ac33f rhi: Add support for half precision vertex atttributes
Runtime support is indicated via QRhi::Feature::HalfAttributes.

OpenGL support is available in OpenGL 3.0+, OpenGL ES 3.0+, and in
implementations that support the extension GL_ARB_half_float_vertex.

Other RHI backends (Vulkan, Metal, D3D11, and D3D12) all support this
feature.

Note that D3D does not support the half3 type.  D3D backends pass half3
as half4.

tst_qrhi auto unit test included.

Change-Id: Ide05d7f62f6102ad5cae1b3681fdda98d52bca31
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-02-27 09:25:02 -08:00
Ben Fletcher
dd3105d68d rhi: Add support for half precision vertex atttributes
Runtime support is indicated via QRhi::Feature::HalfAttributes.

OpenGL support is available in OpenGL 3.0+, OpenGL ES 3.0+, and in
implementations that support the extension GL_ARB_half_float_vertex.

Other RHI backends (Vulkan, Metal, D3D11, and D3D12) all support this
feature.

Note that D3D does not support the half3 type.  D3D backends pass half3
as half4.

tst_qrhi auto unit test included.

Change-Id: Ide05d7f62f6102ad5cae1b3681fdda98d52bca31
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-02-27 09:24:20 -08:00
Ben Fletcher
3bf1541502 rhi: Add support for half precision vertex atttributes
Runtime support is indicated via QRhi::Feature::HalfAttributes.

OpenGL support is available in OpenGL 3.0+, OpenGL ES 3.0+, and in
implementations that support the extension GL_ARB_half_float_vertex.

Other RHI backends (Vulkan, Metal, D3D11, and D3D12) all support this
feature.

Note that D3D does not support the half3 type.  D3D backends pass half3
as half4.

tst_qrhi auto unit test included.

Change-Id: Ide05d7f62f6102ad5cae1b3681fdda98d52bca31
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-02-27 09:23:47 -08:00
Ben Fletcher
5dfb25e253 rhi: Add support for half precision vertex atttributes
Runtime support is indicated via QRhi::Feature::HalfAttributes.

OpenGL support is available in OpenGL 3.0+, OpenGL ES 3.0+, and in
implementations that support the extension GL_ARB_half_float_vertex.

Other RHI backends (Vulkan, Metal, D3D11, and D3D12) all support this
feature.

Note that D3D does not support the half3 type.  D3D backends pass half3
as half4.

tst_qrhi auto unit test included.

Change-Id: Ide05d7f62f6102ad5cae1b3681fdda98d52bca31
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-02-27 09:23:24 -08:00
Ben Fletcher
9ffa16baf0 rhi: Add support for half precision vertex atttributes
Runtime support is indicated via QRhi::Feature::HalfAttributes.

OpenGL support is available in OpenGL 3.0+, OpenGL ES 3.0+, and in
implementations that support the extension GL_ARB_half_float_vertex.

Other RHI backends (Vulkan, Metal, D3D11, and D3D12) all support this
feature.

Note that D3D does not support the half3 type.  D3D backends pass half3
as half4.

tst_qrhi auto unit test included.

Change-Id: Ide05d7f62f6102ad5cae1b3681fdda98d52bca31
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-02-27 09:23:05 -08:00
Volker Hilsheimer
fac889cc5a QStyleSheet: never treat styled scrollbars as transient
If a style sheet is applied to a scrollbar, then we cannot treat it as
transient, as the QStyleSheetStyle doesn't implement any fade-in/out
animation logic. And we also need to set the overlap to 0 (in both
the style sheet and the macOS style) if the scrollbars are not
transient; otherwise the opaque scrollbar will be placed on top of the
content.

Since a style sheet might only apply to a scrollbar based on its
orientation, we also have to pass the style option through to all calls
of the styleHint function.

And since that function is also called from other QStyle implementations
in the macOS style, we have to make sure that we call styleHint() on the
widget's style to get the correct value based on the style sheet.

Fixes: QTBUG-63381
Pick-to: 6.5 6.4 6.2
Change-Id: Ic67ce3a7cb5089f885dabfd5a1951e3029915446
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-02-27 16:19:18 +01:00
Volker Hilsheimer
eedcda282f QtGui: Use single precision for mouseMove detection
QGuiApplication::lastCursorPosition is a QPointF, and (at least on macOS)
compares always different from the QPointF stored in the event. This
might be due to the translation from system coordinates to QPointF
introducing noise.

The result is that even a simple button press causes mouseMove events
to be delivered.

To prevent this event noise, overload equality operators for the special
QLastCursorPosition type when comparing with QPointF to explicitly use
single precision comparison.

Pick-to: 6.5 6.4 6.2
Fixes: QTBUG-111170
Change-Id: I82ea23ac9f4fa80c55c9c5c742527dd7ee74fd99
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-02-27 16:18:38 +01:00
Ievgenii Meshcheriakov
742e79312f chat example: Update code style
Use lambdas instead of slots where practical.
Consistently use signals to transmit D-Bus messages.
Extract a local variable for the used D-Bus connection.

Task-number: QTBUG-111366
Pick-to: 6.5
Change-Id: Icc6667e1392ada1b7d3b33c4e4b32917dd648390
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-02-27 15:55:07 +01:00
Ievgenii Meshcheriakov
57d25b3a53 chat example: Remove empty destructor
Task-number: QTBUG-111366
Pick-to: 6.5
Change-Id: I880c16638c992a4ee8528b1c545e6f563a7efa8b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-02-27 15:55:07 +01:00
Ievgenii Meshcheriakov
fd03a04457 chat example: Remove commented-out code
Task-number: QTBUG-111366
Pick-to: 6.5
Change-Id: Ib8e89427357f604ab30cb0de50eb373cffb945fa
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-02-27 15:55:07 +01:00
Ievgenii Meshcheriakov
8b48657590 chat example: Use QInputDialog to get a user nickname
This gets rid of a custom form. Also quit the application if user
closes the input dialog without entering a nickname.

Task-number: QTBUG-111366
Pick-to: 6.5
Change-Id: I56ed99d69d031e7ef06711fc7ec112311c974ca6
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-02-27 15:55:07 +01:00
Mårten Nordheim
acc6dc9c09 Mark variable only used in Q_ASSERT as unused
Change-Id: Idee2a4772c7c12e293838a647ed768295612f794
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-27 12:10:43 +01:00
Doris Verria
276bf8cb23 Examples doc: Tag 'To Do List Example' for iOS
All QtQuickControls examples are marked for android by default.
However, the To Do List example is iOS specific so don't include it.
Add it to the list of iOS tags instead.

Fixes: QTBUG-111426
Pick-to: 6.5 6.4
Change-Id: Ic89d6b40d263f81ed402a2064f2e44b2fa826940
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-02-27 10:10:10 +01:00
Marc Mutz
e388d219a4 QCryptographicHash: don't include openssl/sha.h
... it conflicts with rfc6234/sha.h's SHA{1,224,256,384,512} symbols.

We can't drop the rfc6234/sha.h header, as openssl/sha.h doesn't give
us the algorithm's block sizes, necessary for HMAC
(QMessageAuthenticationCode).

But we can drop openssl/sha.h. The only reason we included the header
was to get access to SHA<N>_DIGEST_LENGTH, but this is a well-known
value and easily obtained from rfc6234/sha.h as SHA<N>HashSize, so use
that.

Even reduces #ifdef'ery.

Amends d9f9d03fd3.

Fixes: QTBUG-111467
Pick-to: 6.5
Change-Id: Ice19ad8c788fb2828666647cc40abb894cd7af2b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-02-27 09:10:09 +00:00
Amir Masoud Abdol
863eb576c8 Remove qmake files that provide support for building Qt modules
Repeating the body of the reported bug, "Building Qt modules with qmake
is unsupported in Qt6 and since 6.5's switch to syncqt.cpp broken."

[ChangeLog][qmake] Support for building Qt modules with qmake was
removed.

Pick-to: 6.5
Fixes: QTBUG-110134
Change-Id: Iee5aa5c85f7106bce742df448ec502e6cc039454
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-02-27 10:10:09 +01:00
Volker Hilsheimer
f75b29fbbd QListView: Reset style after using a temporary proxy
Amends 0242be9060, and removes unwanted
side effect of having a modified style behavior for later functions.

Pick-to: 6.5 6.4 6.2
Change-Id: If3dff0d7ab9e6c6c10e7a92d0a3eaff98fa1457f
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-02-27 10:10:04 +01:00
Oliver Wolff
c912bde52a Windows drag&drop: Use correct window for drag target processing
GetFocus will return the window that currently has keyboard focus. This
is not what we want for drag and drop handling though. Use the window
under mouse and process events for that window when doing the touch/pen
input workaround. If no window is found we fall back to the focus
window. Followup to 31e7790102

Fixes: QTBUG-111149
Pick-to: 6.5 6.4 6.2
Change-Id: Ib8233debc267df0cc19b21c1dc5c6881d018d84a
Reviewed-by: Timothée Keller <timothee.keller@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2023-02-27 08:26:49 +00:00
Christian Ehrlicher
6b9977c4ad SQL/OCI: Correctly calculate utc offset string when icu is not available
When ICU is not available, QTimeZone::displayName() does not return a
valid timezone offset string so the OCI driver will get a wrong utc
offset string and inserting a QDateTime will go wrong.
Fix it by creating the utc offset string by ourself (toOffsetString()
inside qdatetime.cpp is static and therefore not accessible for us).

Pick-to: 6.5 6.4 6.2 5.15
Fixes: QTBUG-111275
Change-Id: Ib724d760688614e162246e1e028ee5e004cc9477
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-02-27 06:23:58 +01:00
Ivan Tkachenko
aa111ada08 Doc: Fix typo in word mnemonic
Pick-to: 6.5 6.2
Change-Id: I7e667e29742d4672c445f8f42a04d81579112213
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-02-26 21:33:08 +00:00
Marc Mutz
ce955cd3ca QMessageAuthenticationCode: Extract Method setKey() from initMessageHash()
This makes it explicit when we process the key (setKey() called) and
when we don't. That the old initMessageHash() left the key alone if it
already had the correct size was properly hidden in plain sight. The
split makes clearer what's going on.

Pick-to: 6.5
Change-Id: Ib013dbf8b976aa9f564224866091256aa8434cbd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-02-26 16:27:45 +01:00
Marc Mutz
bdb13a1b31 QSmallByteArray: add sufficient API to make conversion to QByteArrayView implicit
Iterators were missing. Provide a const data() overload to implement
the iterator functions in their natural form.

Pick-to: 6.5
Change-Id: I906013e55fce2effbedba0d283fb4cea3b512fdd
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-26 07:51:47 +01:00
Marc Mutz
a62aa18178 tst_QMessageAuthenticationCode: check that setKey() reset()s
It's documented as such.

Pick-to: 6.5 6.4 6.2 5.15
Change-Id: I7299d289117e52dcefe3c4ab917d7ecad6dd02be
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-02-26 07:51:29 +01:00
Marc Mutz
54a4d4bf76 QCryptographicHash: implement non-OpenSSL3 part of supportsAlgorithm()
Unconditionally returning true is incorrect, not only just since
NumAlgorithms was added in 0411d98192.
The values may have gaps, we might be compiling with SHA1_ONLY, and,
on a language-lawyer level, enums can legally contain values other
than those explicitly enumerated, so give the right answer in all of
these cases.

Pick-to: 6.5
Change-Id: I705d4f759b2572b8b3d1cee18b7939939eedbbac
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-26 07:51:13 +01:00
Thiago Macieira
ec2c27d596 QDeadlineTimer: add a few missing default template parameters
I don't think any of these make a difference because the Duration is an
implied parameter because of the time_point arguments, but this makes
the code match QDeadlineTimer::deadline<T>.

Pick-to: 6.5
Change-Id: Ieec322d73c1e40ad95c8fffd17468a41182944ab
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-02-25 18:14:11 -08:00
Thiago Macieira
81783d02e8 QElapsedTimer & QDeadlineTimer: use NSDMI for their two fields
Pick-to: 6.5
Change-Id: Ieec322d73c1e40ad95c8fffd174654d643c05097
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-02-25 18:14:11 -08:00
Thiago Macieira
cf059ac9ec QThread/Unix: move qt_nanosleep to qthread_unix.cpp
It's the only place that uses it.

Pick-to: 6.5
Change-Id: Ieec322d73c1e40ad95c8fffd17465370ac209c2f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2023-02-25 18:14:11 -08:00
Ahmad Samir
caa21ffc65 tst_benchlibcallgrind: silence a compiler warning
Change-Id: I68cc530fa8eaf941a6ddb7e6987ff37ec270bc4d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-26 03:14:46 +02:00
Samuel Gaist
283cdb0e70 examples: port widget examples to new connection style
Task-number: QTBUG-106893
Change-Id: Ib10fd516fdbeda0087b1c8550ce340acd3973e6b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-02-25 22:11:57 +01:00
Ahmad Samir
683ddddc6a q_core_unix: move timspec<->chrono helpers from qtools_p.h
Where it has a home with its other timespec/chrono siblings.

Luckily I only needed to change one place in the code, and that source
file already has #include's q_core_unix_p.h.

Change-Id: I783383f958ceccfd6f9210f0b76d35b0f82b7cb5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-25 23:11:54 +02:00