Commit Graph

66572 Commits (0aa04fe8a4cb6aa654fb50df60ba192327e29d1d)

Author SHA1 Message Date
Thiago Macieira 0aa04fe8a4 CBOR: inline the contents of compare() into comparesEqual/ThreeWay()
This removes all conversions between types and compares the internals
only.

Change-Id: I5f663c2f9f4149af84fefffd17c034e384071aa9
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-04-08 13:31:22 -07:00
Thiago Macieira c0c8b1be35 CBOR: de-inline some comparesEqual() and compareThreeWay() functions
This is the first step in optimizing the comparisons by avoiding the
conversions in user code. Thus, we don't de-inline the homogeneous
compareThreeWay() functions.

This is done with an extra level of indirection by adding static
*_helper() functions, which have the advantage of being members and thus
benefit from the class' friendships. And it allows us to pass
QCborValueConstRef by value.

Change-Id: I5f663c2f9f4149af84fefffd17c032b32eff7a4e
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-04-08 13:31:22 -07:00
Thiago Macieira 84b2982c6e tst_QCborValue: merge sorting() and comparison() tests
Drive-by add NaN value for testing.

Change-Id: I5f663c2f9f4149af84fefffd17c035f099d01d55
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-04-08 13:31:21 -07:00
Thiago Macieira 394788c68e QCborValue: fix sorting of UTF8-to-UTF16 strings
We must compare the raw string length in UTF-8, not the UTF-16 one.

[ChangeLog][QtCore][QCborValue] Fixed a bug that caused certain
non-US-ASCII string comparisons to produce results not in line with the
CBOR specifications.

Pick-to: 6.5 6.6 6.7
Change-Id: I5f663c2f9f4149af84fefffd17c05d1c0f1bbc3a
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-04-08 13:31:21 -07:00
Tor Arne Vestbø 085d5db90d macOS: Send key press as QKeyEvent if input context doesn't consume it
If IM is enabled we send key events through the macOS text input system,
and we do this for all key pressed, including the ones with modifiers
pressed. The latter allows the input method to respond to shortcut
key combinations to switch its own mode or do more advanced operations
on the text.

We were relying on the IM to call doCommandBySelector with a noop
selector if the shortcut didn't match any of its own internal key
sequences, but this fails for key events with more than one modifier
pressed.

Instead of using [NSView interpretKeyEvents:] to pass the key event
to the system IM we now go directly to the NSInputContext, which the
former method is just a wrapper for. This allows us to use the result
of [NSInputContext handleEvent:] to determine if the system IM consumed
the event or not. For key events with multiple modifiers this will be
false, which we interpret to send the event as a regular QKeyEvent
instead.

Fixes: QTBUG-123848
Fixes: QTBUG-106516
Pick-to: 6.7 6.5 6.2
Change-Id: I14a43c2029149514515dd9ece881aed3f6500a4e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-04-08 22:31:21 +02:00
Assam Boudjelthia 5994def6ab Revert "Android: skip vulkan tests for tst_qrhiwidget"
Amends feff219aad which didn't really
do the revert for some reason.

This reverts commit bba26d7220.

Reason for revert: Latest emulator update fixed the issue.

Change-Id: I0bc4263eae36c3ff81f235dcfe3bad9b30afd5d8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2024-04-08 18:44:35 +03:00
Mitch Curtis 3f720b8acf QGridLayoutEngine: print stringified layout item in warnings
This provides a way for the user to identify any items involved in
warnings we may print, as e.g. their objectName will be included.

Qt Quick's Layout types can use this to stringify the QQuickItem,
which will result in the type and objectName being printed.

Change-Id: I3d6b6ea0315df98629992afd29e4bf2aad847e22
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2024-04-08 10:17:46 +08:00
Tor Arne Vestbø ce23c9083f cmake: Only enable warnings on/off flags for C/C++/Objective-C/C++
The flags are not valid for e.g. Swift

Pick-to: 6.7
Change-Id: Ie5b46dc9147d8c024e7e27712c7b8632abd727d9
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-04-07 20:24:12 +02:00
Zhao Yuhang d12490f661 QtCore: avoid unnecessary export in static build
We only need it to be exported in shared builds.
Without this change, there will always be an
exported symbol called "qt_startup_hook" for
executables that linked against QtCore statically,
this is absolutely not the Qt user would expect.

Change-Id: Icf19df09531e13184ea019aa708d6b93fa626f85
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-04-06 13:14:52 +00:00
Zhao Yuhang 079578eadd QWidget: fix link error in static build
QtQuick also uses "lcFocus" as a category name, which
causes link errors in static builds when both QWidget
and QtQuick are linked in one executable.

Making it static is also a good solution, but here
adding a "Widget" prefix seems more consistent.

Change-Id: I0a6a02750bd347f62b67544b4044789612f0fa4d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-04-06 13:14:25 +00:00
Giuseppe D'Angelo dde96f0f47 QPixelLayout: fix convertCMYKToRGBA32F
The assignment to the output was missing.

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

Change-Id: Ibe33073b7e97597631a8dbb0035742693fef97f5
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2024-04-06 13:49:11 +02:00
Allan Sandfeld Jensen 923c5145a8 Parse grayscale ICC profile as grayscale color spaces
Removes the old hack of parsing them as a compatible RGB color space.

Change-Id: I876d74ca5830b46decc15b20e8a3baa12d5e2713
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2024-04-06 09:05:14 +02:00
Assam Boudjelthia 772fd609c6 Revert "Android: SKIP cases failing on Android 12 CI with 16GB RAM"
This partially reverts commit eb0d7b5dcf.
Leaving tst_QRhi::tessellation() skipped because it still fails.

Reason for revert: The latest emulator fixed the issue.

Fixes: QTBUG-111235
Fixes: QTBUG-111236
Task-number: QTQAINFRA-5971
Pick-to: 6.7 6.6 6.5
Change-Id: I9a624be6ba219a4175c0e84ba68d882953422cba
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2024-04-05 20:31:07 +00:00
Assam Boudjelthia 471098918d Revert "Skip Vulkan on Android in QRhi autotest"
This reverts commit 0d413506a1.

Reason for revert: Latest emulator fixed the issue.

Task-number: QTBUG-118220
Task-number: QTQAINFRA-5971
Pick-to: 6.7
Change-Id: I0d4792ef68a3ad840c8c353f55cb96d0be7cd66e
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2024-04-05 20:31:07 +00:00
Assam Boudjelthia feff219aad Revert "Android: skip vulkan tests for tst_qrhiwidget"
This reverts commit bba26d7220.

Reason for revert: Latest emulator update might have fixed the issue.

Task-number: QTQAINFRA-5971
Pick-to: 6.7
Change-Id: I171b9bf805b4794088fe62275beac993dc948ad1
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2024-04-05 20:31:06 +00:00
Assam Boudjelthia 4244b4194c Revert "Skip QVulkan autotests on Android"
This reverts commit c6138bf9de.

Reason for revert: latest emulator version fixed the issue.

Task-number: QTBUG-118234
Task-number: QTQAINFRA-5971
Pick-to: 6.7
Change-Id: I7137851baf2b71e760af4bfab7726d761b7f59ff
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2024-04-05 20:31:06 +00:00
Mårten Nordheim 5eecb143bc QNetworkInterface[unix]: fixup some memcpys
There is an untested config for enabling null-strings, so technically
not supported. But if we ever want to make null mean null
then we should protect against it.

Also drop the explicit template argument for qMin. This means
we use the hetereogeneus version which will promote to
size_t. Which is the type that memcpy expects anyway.

Change-Id: I91e0a3b159b065b76e9e93605ef0e502f41af74f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-04-05 21:32:26 +02:00
Mårten Nordheim 4853a52943 Network: cleanliness
QT_NO_CAST_TO_ASCII
QT_NO_CAST_FROM_BYTEARRAY
QT_NO_URL_CAST_FROM_STRING

Change-Id: Ic77ed8ccbdb146b7e7b26123923795f9748d3a38
Reviewed-by: Mate Barany <mate.barany@qt.io>
2024-04-05 21:32:25 +02:00
Oliver Eftevaag 953f701799 Add AA_DontUsePopupWindows
We want QQuickPopup to open a top-level window in qt quick, by default.
But also allow users to opt out, and revert back to the old behavior.

It makes sense to have an application wide setting for this, in order
to allow application developer to opt out of the new default behavior,
without having to change a property for every instance of Popup.

While QCoreApplicationPrivate::attribs bearly has any available bits,
it appear that bit 30 is available, since
AA_DisableWindowContextHelpButton was commented out.

Task-number: QTBUG-121363
Change-Id: I6b2759d89b46aa5d08222c2611eaffe855cc425c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2024-04-05 20:27:14 +02:00
Allan Sandfeld Jensen 48d582e0b7 Handle chad elements in ICC profiles
Parse them, so we can change white-points correctly,
and write them as required by ICCv4

Change-Id: I6d28fb6a85585f80a9867df45864069efda956c5
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2024-04-05 18:40:47 +02:00
Allan Sandfeld Jensen 04e5b86f9e Make QColorTrcLut more flexible
Make it possible to generate one way QColorTrcLut tables, and make it
easier test out different table size,

Change-Id: I953c68d772699de87fdddbf15ce196e6ba8b9898
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2024-04-05 18:40:47 +02:00
Allan Sandfeld Jensen 05b8467304 Add color space model, making gray color spaces explicit
This also adds image conversion of both format and color space, which
will also  be required later for conversions to CMYK formats and color
spaces.

Change-Id: I578c0a010ffcdb4df4cf9080c0621fac8bc342bf
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2024-04-05 18:40:47 +02:00
Mårten Nordheim a786404036 NetworkReply[wasm]: simplify some buffer passing
It was always passing a QByteArray to a const char * argument,
with the size along with it. That was immediately converted
back to a QByteArray. Instead, just pass the byte array
which anyway knows its size.

Needed for a followup commit

Change-Id: I821d419adcb600456826dde67fb92ecad11cb290
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-04-05 18:40:39 +02:00
Giuseppe D'Angelo eca0512b08 QImage: remove the last mentions of Format_CMYK32
Change-Id: I8ef63d7f3f14f16111a7e45e07734c10e448984c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2024-04-05 14:41:31 +02:00
Piotr Wierciński 157c9eef48 Revert "wasm: Proxy emscripten_fetch() to the main thread"
This reverts commit f2f2b6ef18.

Reason for revert: There are couple of issues introduced. Lets revert to base revision and go with fixes from there.

Pick-to: 6.5 6.6 6.7
Change-Id: I8341de42ef3e4a609bfbffdb763dd5c28794473c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
2024-04-05 14:41:23 +02:00
Mark Brand 938bdccb89 QNetworkInfo[win]: Explicitly link with oleaut32 for MINGW too
Following up on 2 commits that fixed static linking for MSVC but left
out MINGW:
    230c53ad9d
    d9820b0207

Pick-to: 6.6 6.7
Fixes: QTBUG-114243
Change-Id: I12853355ffa1a62acce15ff660478f618c42e0a6
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-04-05 13:52:28 +02:00
Mark Brand 7e5a0b54f0 SQL/ODBC: QODBCDriver::record Unable to allocate handle
Seems to have been left out by 874f5c1f463cad61f49e0ff7007852a73fd93e7c

Pick-to: 6.7
Fixes: QTBUG-123478
Change-Id: Ic028c3786203cbc1c3d7316c1ae22c12a928b170
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2024-04-05 07:59:42 +00:00
Tim Blechmann 93f87326f2 QLocale: silence fallthrough warning
clang doesn't seem to consider `Q_ASSERT(false)` as empty statement.

Pick-to: 6.7
Change-Id: If99c7d4874450d781182491ef3963f1ee96285a6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-04-05 02:17:42 +00:00
Pavel Dubsky 72a86dc0f8 Remove QWindowsComBase
QWindowsComBase is now replaced with QComObject, let's remove the
former since it's a duplication.

Change-Id: I7f911fa036c1f2eaaee168250b8294170430cc5d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-04-05 02:09:31 +01:00
Giuseppe D'Angelo 2dc78efbe4 QIcc: re-add an extra check in parseLutData
Change-Id: Ifce2dc720e4e4cae54a00147049edcf369ae8190
Done-by: Allan Sandfeld Jensen
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2024-04-04 23:11:50 +01:00
Christian Ehrlicher 9873f4b283 SQL/ODBC: don't escape a driver string
We must not try to escape a driver string, the user has to make sure
that everything is correctly escaped when passing a complete driver
string. This fixes a regression from QTBUG-122642.

Pick-to: 6.7
Fixes: QTBUG-123444
Change-Id: I43316c7a09060f5c8117fdc3c464d239e37d9cdf
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2024-04-04 23:43:02 +02:00
Christian Ehrlicher 5a03e5c51b SQL/ODBC: don't create temporary QStrings
... but use QStringView instead in setConnectionOptions() and the
dependent functions.
Also remove the (undocumented) ability to pass the connection options in
non-uppercase - this was never supported and all other plugins don't
support this either.

[ChangeLog][SQL][ODBC] All options must now be upper-cased as documented. Lower-cased options are no longer supported.

Change-Id: I822db1ddf205c22fe939299c4ab741bbe9b56d65
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-04 21:43:01 +00:00
Christian Ehrlicher 1dd3f46570 SQL/SQLite: use categorized logger
Use the categorized logger qt.sql.sqlite

Change-Id: I70880fca579df56500ddc94a72bc6c616c475e67
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-04 22:43:01 +01:00
Christian Ehrlicher d99d355e49 SQL/MySQL: use categorized logger
Use the categorized logger qt.sql.mysql

Change-Id: I7e6529025dceb81c47571c65b7aea9bd274814e2
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-04 22:43:01 +01:00
Christian Ehrlicher efd26cdb2a SQL/ODBC: use categorized logger
Use the categorized logger qt.sql.odbc

Change-Id: I1411e80fa33582857bafdf77baee75b293df56af
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-04 22:43:01 +01:00
Tor Arne Vestbø 1bd755465e widgets: Invalidate RHI swapchain when window moves to new top level
When a QWidget with an associated RHI swapchain (via its QWindow) is
moved to a different top level window, that top level window has its
own backing store, and QBackingStoreRhiSupport, which doesn't know
anything about the fact that the window already has an associated
swap chain in the original top level window's QBackingStoreRhiSupport.

As having multiple swap chains for the same window is not supported
on all RHI backends (Vulkan and DX in particular), we need to throw
away the swap chain when detecting that the window is moved to a new
top level.

We do this by hooking into the existing WindowAboutToChangeInternal
event delivery to renderToTexture children, which now delivers the
event both to renderToTexture QWidget children as well as QWindows
in the hierarchy. The condition of when to deliver the event has
been updated to reflect whether the top level uses RHI for flushing,
instead of only including renderToTexture children, as the former
also includes setting QT_WIDGETS_RHI=1 explicitly.

The event is then caught by QBackingStoreRhiSupportWindowWatcher,
and handled the same way as for SurfaceAboutToBeDestroyed.

Renaming qSendWindowChangeToTextureChildrenRecursively would make
sense at this point, but to make cherry-picks easier we keep the
current name for now.

Fixes: QTBUG-120276
Pick-to: 6.7 6.5
Change-Id: Ic4c60e89be985f12a84e9f893c299e602b70851a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2024-04-04 21:42:14 +02:00
Assam Boudjelthia 0a45996376 JNI: check for pending exception first in getCleanJniObject()
returning early if the object is null will not clear pending exceptions
from the previous failed JNI call, and that will crash the app on the
next jni call if an explicit exception clearing is not done, wish mostly
the case. Checking and clearing for exceptions has to always be done
under this call.

Pick-to: 6.7
Fixes: QTBUG-122135
Change-Id: I0d42d012a4d1305fa07147fd22860d7c005f9b83
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2024-04-04 19:12:55 +00:00
Shawn Rutledge 14610fb174 doc: Remove deprecation of the supported QTouchEvent ctor
Amends 111115bf88

Change-Id: Ibc557fdde9c894a3a58bb58835e11be9180e6e6d
Pick-to: 6.2 6.5 6.7
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2024-04-04 20:05:10 +02:00
Axel Spoerl f54953a0ab Android notification example: Correct connect statements
The example breaks building 6.7 with examples on Android, due to
QObject::connect() to a lambda without context object.

Add context object.

Fixes: QTBUG-123989
Pick-to: 6.7 6.6 6.5 6.2
Change-Id: Id3994e577a8a676220ac8d9f95d01c054839c143
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-04-04 19:29:23 +02:00
Giuseppe D'Angelo a07519f51f QColorTRC: code tidies
* Unexport the class (it's fully defined inline)
* Use QFlags instead of "manual" math on an enum class.

The latter requires some extra minor syntax adjustements (making
the enumeration public, so that the operators can pick it up; and
explicitly wrap a couple of usages of the enumerators as
the operators on them are defined *after* the class itself).

Change-Id: I176558de2d5e75697d62790d8783c417997206a9
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2024-04-04 18:11:14 +01:00
Edward Welbourne 612ed28985 QCollatorSortKey: Rule of Five: add missing move constructor
It has move assign, so should have move-construct. This turns out to
need QT_DECLARE_QESDP_SPECIALIZATION_DTOR_WITH_EXPORT() and
QT_DEFINE_QESDP_SPECIALIZATION_DTOR(QCollatorSortKeyPrivate).

In the process, make the move assignment and constructor docs in
qcollator.cpp conform to the usual pattern.

Fixes: QTBUG-123326
Change-Id: I6fc9ed254dc396ff6130df09826b993e98dcf101
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-04-04 18:11:14 +01:00
Matthias Rauter 7d5646c02e Fix range-loop-detach warning in qhttp2connection.cpp
Pick-to: 6.7
Change-Id: I0b02e2f79ab7828858da3b4ca9840ad07d39a70a
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-04-04 17:11:14 +00:00
Matthias Rauter 88f034e556 Remove unused variables in QHttp2Stream::internalSendDATA
Pick-to: 6.7
Change-Id: I13c546c7dc4cc3d15d8d92b62f053e438b5d6b64
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-04-04 17:11:14 +00:00
Matthias Rauter 5e19f4a8b2 Fix fully-qualified-moc-types clazy warnings in qhttp2connection_p.h
Pick-to: 6.7
Change-Id: Ia5cda794989757a501e83c15d1ad348a48ac4923
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-04-04 17:11:14 +00:00
Allan Sandfeld Jensen a07cb53c23 Fix a regression when painting CMYK over ARGB32_Premultiplied
With the introduction of CMYK32 the old logic of assuming depth
meant compatible alpha version no longer works. So change the logic
to more explicitly return compatible opaque or alpha versions and
remove the now invalid qt_maybeAlphaVersionWithSameDepth.

Change-Id: Ib1f7b76b0ce0eae7d49a0dfe369918a746bbe2b4
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2024-04-04 18:27:41 +02:00
Giuseppe D'Angelo 7f72a93e87 Port QImage::Format_CMYK32 to CMYK8888
Follow the established convention that byte-oriented image formats
have the "8888" suffix, not "32". The old enum name is temporarily
left to help port other submodules.

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

Change-Id: I4b6f10cb22312b614cb9cf4b0ac439907276c538
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2024-04-04 16:08:22 +01:00
Martin Storsjö adb49d65e0 QTypeInfo: Add a missing include
This header uses std::is_trivial_v, which requires including
the <type_traits> header.

When building with PCH enabled (which is the default), this
dependency does get satisfied via the PCH, so no issue is
visible.

This fixes building with recent version of libc++ when configured
with _LIBCPP_REMOVE_TRANSITIVE_INCLUDES (which removes unnecessary
transitive dependencies between the libc++ headers, a configuration
which may become the default in the future), with PCH disabled.

Pick-to: 6.7 6.5 6.2
Change-Id: I5e3ae20e366ed3028b1156cee05bcf2908d6e845
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2024-04-04 18:08:22 +03:00
Axel Spoerl 58d5d4b7c2 Abstract QWidget focus chain management
The focus chain in widgets is implemented as a double-linked list,
using QWidgetPrivate::focus_next and focus_prev as pointers to the
next/previous widget in the focus chain.

These pointers are manipulated directly at many places, which is error
prone and difficult to read.

Build an abstraction layer and remove direct usage of focus_next and
focus_prev. Provide functions to insert and remove widgets to/from the
focus chain.

Add a test function to tst_QWidget.

Task-number: QTBUG-121478
Change-Id: Ide6379c0197137e420352a2976912f2de8a8b338
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2024-04-04 16:13:29 +02:00
Axel Spoerl f7a809ab73 Stabilize tst_QComboBox:popupPositionAfterStyleChange()
Wait 2x double click interval, to make sure a double click is safely
avoided.

Use QTRY_COMPARE at the end of the function, to cover cases where a
synchronously delivered mouse click causes posted events.

Wrap the test implementation in #ifndef QT_NO_STYLE_FUSION, as is the
declaration.

Skip the test on QNX.

Fixes: QTBUG-123798
Pick-to: 6.7 6.6 6.5
Change-Id: I73f4acb241a8c77a542152288c65f3d07582e075
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2024-04-04 16:13:28 +02:00
Tinja Paavoseppä 02bab22fde Android/QtView: Move resizing of the QWindow to Qt thread
Since any window resize events originating from Qt side are ran in the
Qt thread, having the one originating from Android run in the Android
thread can lead to race conditions especially during orientation changes.

Pick-to: 6.7
Change-Id: Iebebec2fffdaf9181b01fc1e8f539c7bc232996d
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-04-04 15:46:44 +02:00