Commit Graph

59459 Commits

Author SHA1 Message Date
Kai Köhne
8bf602518d Enforce strict standards behavior in MSVC headersclean check
The comment apparently doesn't apply anymore.

Change-Id: Ie0572341c55d60b83ff428134ba803068fa20558
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-01-03 13:53:47 +01:00
Kai Köhne
5de97970b8 Remove cmake output about module major/minor/patch version
I don't quite see the relevance of this. We have explicit warnings
if versions don't match a bit below.

Pick-to: 6.5
Change-Id: I08253fb99313896adb2c13d193ed3ec3954fb0b0
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2023-01-03 13:53:47 +01:00
Liang Qi
3790821b22 ibus: support high dpi for cursor rectangle
on both X11/xcb and Wayland.

Following similar approach in QFcitxPlatformInputContext::cursorRectChanged()
https://github.com/fcitx/fcitx5-qt/blob/master/qt5/platforminputcontext/qfcitxplatforminputcontext.cpp#L490-L532

Tested with following configurations:
* GNOME on xorg, 100%/125%/150%/200% scale, 1 and 2 monitors
* KDE/Plasma X11, 100%/150%/200% scale, 1 monitor
* GNOME on Wayland, 100%/200% scale, 1 and 2 monitors

Enable fractional scale on GNOME:
gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']"

Pick-to: 6.5 6.4 6.2 5.15
Fixes: QTBUG-103393
Change-Id: Idfd3153e4cd9f9530b4db6f089830ec47451a19e
Reviewed-by: Ilya Fedin <fedin-ilja2010@ya.ru>
Reviewed-by: Weng Xuetian <wengxt@gmail.com>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2023-01-03 12:07:44 +01:00
Liang Qi
54002671bd ibus: add SetCursorLocationRelative in InputContext.xml
Task-number: QTBUG-103393
Pick-to: 6.5 6.4 6.2 5.15
Change-Id: I90c48a0d698636ed289d6f6c1485875e2e91fb34
Reviewed-by: Ilya Fedin <fedin-ilja2010@ya.ru>
Reviewed-by: Weng Xuetian <wengxt@gmail.com>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2023-01-03 12:07:44 +01:00
Liang Qi
f09f516ac1 tests: skip tst_QComboBox::cancelClosesPopupNotDialog() on Wayland
QWindow::requestActivate() is not supported.

This amends c95de359b4.

Task-number: QTBUG-107153
Pick-to: 6.5 6.4
Change-Id: I45f53b5e9de85049ca41cc139a78a82450f53bed
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-01-03 12:07:43 +01:00
Axel Spoerl
71e67dec95 Stabilize tst_QSpinBox::sizeHint()
The test function used to flake on Linux occasionally.
8e6ede7cd1 provided a fix. While it
seemed to work, further analysis has shown that the root cause is
event sequence in case of multiple paint events.

This patch re-engineers the test function:

1. Allocate test widget on the stack instead of the heap.
2. Send layout requests posted by QHBoxLayout constructor and
QLayout::addWidget() before showing the widget.
3. Remove calls to QCoreApplication::processEvents().
They are unnessecary, because
- the size hint request counter is supposed to increase (by any number)
- QTRY_VERIFY processes events anyway until the counter increases or it
times out.

Pick-to: 6.5 6.4 6.2
Change-Id: I54998483725cbdd4899ba6f5469d7dae0980ab1d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2023-01-03 10:57:21 +01:00
Joerg Bornemann
d756f4753e Rename the 'module_name' key in module description JSON files
...to 'name'.
It's clear from the context that this is the name of a module.

Pick-to: 6.5
Change-Id: I07700a4413ceb12695c153e16d0a2dcded615d11
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-01-03 07:30:19 +01:00
Tor Arne Vestbø
9bf42425f1 Don't use var-args for Q_DECLARE_EXPORTED_LOGGING_CATEGORY
MSVC should deal just fine with a single argument macro, and this
prevents the silent mistake of passing a single argument to
Q_DECLARE_EXPORTED_LOGGING_CATEGORY which would result in
no error or warning, but without exporting the category.

Pick-to: 6.5
Change-Id: I4190027f8914ad1ef3957759f8e8c0e6cbd8ba97
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-01-03 00:41:21 +01:00
Tor Arne Vestbø
76cef0f171 macOS: Ensure NSEvent processing during NSApp initialization
After 27f0854813 we are ensuring NSApp
initialization without relying on our own runloop sources. But stopping
the app only happens after it has processed an NSEvent, such as a mouse
move or key press, which in the case of an auto tests might not happen.

To ensure that the [NSApp stop] has an effect we post a synthetic event,
that has no other effect than waking up the runloop.

Change-Id: Ifa8912a80f9deff62645cbef56c1b1230542f3e4
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-01-03 00:41:10 +01:00
Kai Köhne
25c67c608a Examples: Do not wrap custom types in Qt namespace
The Qt namespace should be used for types defined in the Qt library,
not for user types.

Pick-to: 6.5
Change-Id: I6df0ca054888f4a65b19a9cb44324321d1dcfad8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-01-02 23:16:30 +01:00
Alexey Edelev
947dd880cc Replace syncqt arguments with rsp file
syncqt arguments contain full paths and may exceed the supported
command line size on some platforms. Use a single rsp file to pass
all arguments to syncqt.

Added the missing end-of-line terminators for error messages.

Pick-to: 6.5
Change-Id: I60ad0f6770458d5256e67f042a63a3c16cd5ecb5
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2023-01-02 23:16:30 +01:00
Alexey Edelev
0a746a30a5 Remove QT_USE_SYNCQT_CPP
Option has not effect anymore.

Pick-to: 6.5
Change-Id: I199ff15ac68b785ba1787d44494c0b2dff3b1ad0
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-01-02 23:16:30 +01:00
Tor Arne Vestbø
ad31b5f4c7 Don't use native dialogs for tst_QApplication::closeAllWindows()
The test shows an application modal QMessageBox, but assumes that doing
so will be non-blocking, which for macOS is not the case (yet). Instead
of making the dialog window-modal, which would potentially affect the
logic of the test, we disable native dialogs. This should be fine, as
the purpose of the test is to test the is_closing logic of
closeAllWindows, which lives on a layer above the native dialogs.

Pick-to: 6.5
Change-Id: I6d627984a6ca452b876f34404b669fce41a00851
Reviewed-by: Doris Verria <doris.verria@qt.io>
2023-01-02 23:12:30 +01:00
Tor Arne Vestbø
351d3e50f9 macOS: Stop using the deprecated [NSWorkspace openFile:] API
We can use openURL instead, which also opens local files in the
associated application.

Pick-to: 6.5
Change-Id: Ieddc6fb68d6b9e64195ed261953b9fffb6b0b73e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-01-02 19:01:30 +01:00
Kai Köhne
7a37114af9 Doc: Fix snippet for Q_DECLARE_EXPORTED_CATEGORY
The name argument must be a C++ variable name, not a string.

Pick-to: 6.5
Change-Id: I6bc45bc9a57fd8429cf033aa118eebff0fcfc4a5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-01-02 18:06:29 +01:00
Jonas Kvinge
314a4d121f QFileSystemEngine: URL encode path in trash info, use relative path
According to the specifications, the path in .trashinfo should be URL
encoded.

The path can be relative when possible, otherwise changing the
mountpoint will break restoring files from trash.
But don't do that for root (/) and home.

For more info, see.:
https://specifications.freedesktop.org/trash-spec/trashspec-1.0.html

Pick-to: 6.5 5.15
Change-Id: Id8271a893a007f4cb5c10611f2b1bc71c1ff4860
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-02 17:39:37 +01:00
Andreas Eliasson
b556d6227f Doc: Fix broken link
Also, adjust line length to be < 80 columns and make link
parenthetical.

Pick-to: 6.5 6.4 6.2
Fixes: QTBUG-107026
Change-Id: I5f7efa5d572103a6fb432d79a52a57363efd9dd7
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
2023-01-02 13:50:52 +00:00
Tor Arne Vestbø
b0af876bed wasm: Flesh out side module and main module logic for shared builds
Task-number: QTBUG-63925
Change-Id: I9da8ca0364a4fe6c9ec4d272657e1cf726d305c4
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2023-01-02 14:50:51 +01:00
Alexey Edelev
9c56a77027 Move '--sign' argument to the end of the androiddeployqt command
The '--sign' argument may and may not accept two follow arguments
to specify signing path and alias from the command line. This
functionality breaks the parsing of command line arguments that
follow the '--sign' argument and expect that '--sign' is used with
no follow arguments. It does make sense to check if the arguments
passed after the --sign staring with '--' to make sure that '--sign'
with no arguments is meant to be used.

Pick-to: 6.4 6.5
Fixes: QTBUG-109619
Change-Id: I4ee7fe953e5378c00760d84ec58f9e89e4348944
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2023-01-02 14:50:51 +01:00
Mikolaj Boc
644036b597 Return to the two-step destruction in compositor
The two-step destruction we used to employ is needed as destroying
a screen which contains a window crashes.

Pick-to: 6.5
Change-Id: I722828be5408a7f079d66e845eeee34ed19cbf34
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2023-01-02 11:17:57 +01:00
Morten Sørvig
a594e95c9a wasm: support setting Emscripten configuration
Support passing Emscripten configuration options to
the QtLoader constructor using the "moduleConfig"
key.

Previously, it was possible to set Emscripten config options
on the global Module object. However, recent versions
if Qt has switched to using the MODULARIZE=1 build setting,
in which case there is no global object.

Fixes: QTBUG-107979
Pick-to: 6.5
Change-Id: Ie99b772ddbb1d9f5464c868a43c821bae01519e0
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2023-01-01 23:50:42 +01:00
Ahmad Samir
9aaf258211 QStringBuilder: document issues with using "auto" keyword
Cleanup QStringBuilder API docs.

Task-number: QTBUG-104354
Change-Id: I00029c8f4bfdf35869396ac14d7d9ba0da34cdb5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-01 17:47:04 +02:00
Ahmad Samir
5d76c49e9c Use more documentation snippets for QString and its siblings
Pick-to: 6.5
Change-Id: Ia569806b586923473f68b9fe1d98a3628ba46a58
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2023-01-01 14:13:50 +02:00
Ahmad Samir
bab660d124 QStringConverter: add QLatin1::convert{To,From}Unicode()
With the methods that use helpers from qstring.cpp defined in the
latter.

Change-Id: I11d6b0bfb95efe34e56d33d2ecbfe8f4423a9e6c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-30 16:36:24 +02:00
Alexey Edelev
6a18bc8090 Revert "CMake: Expose generated resource files to IDEs"
This reverts commit 30efb24d45.

Reason for revert: Breaks resource handling in examples: QTBUG-109678. 

Change-Id: I4abfd9960cc26d9b45317f84e63ff7424982d12f
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2022-12-30 10:41:37 +00:00
Marc Mutz
f68a2316d8 Long live QPromise::addResults()!
Makes the pre-existing QFutureInterface functionality available via
the public QPromise API.

[ChangeLog][QtCore][QPromise] Added addResults() to report multiple
results at once.

Change-Id: I18e6ef2781df422020b9022d78d6c45107b01668
Reviewed-by: Sona Kurazyan <kurazyan.sona@gmail.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-12-30 07:03:51 +01:00
Giuseppe D'Angelo
114b94c26e QTypeInfo: fix pointer detection
Although redudant, people are allowed to use Q_DECLARE_TYPEINFO on a pointer
type. There's no reason to mis-detect the isPointer trait in that case.

Change-Id: Ic116f24397c91f5a3d31f5d8ee9fa2e587823257
Pick-to: 5.15 6.2 6.4 6.5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-12-30 01:52:11 +01:00
Giuseppe D'Angelo
227b9cd084 QTypeInfo: remove further usages of isPointer / isIntegral
In preparation to their deprecation / removal.

Change-Id: Ia073a9f7caabbc06063a1e416b23cdb12788b283
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-30 01:51:27 +01:00
Giuseppe D'Angelo
e8f5f20319 QMetaType: fix value-initialization in a corner case
If a type is trivially default constructible, QMetaType (and QVariant)
think that it can be built and value-initialized by zero-filling a
region of storage and then "blessing" that storage as an actual instance
of the type to build. This is done as an optimization.

This doesn't work for all trivially constructible types. For instance,
on the Itanium C++ ABI, pointers to data members are actually
value-initialized (= zero-initialized, = initialized to null) with the
value -1:

https://itanium-cxx-abi.github.io/cxx-abi/abi.html#data-member-pointers

This means that a type like

  struct A { int A::*ptr; };

is trivially constructible, but its value initialization is not
equivalent to zero-filling its storage.

Since C++ does not offer a type trait we can use for the detection that
we want to do here, and since we have also decided that Q_PRIMITIVE_TYPE
isn't that trait (it just means trivially copyable / destructible), I'm
rolling out a custom type trait for the purpose.

This type trait is private for the moment being (there's no
Q_DECLARE_TYPEINFO for it), and limited to the subset of scalar types
that we know can be value-initialized by memset(0) into their storage
(basically, all of them, except for pointers to data members).

The fix tries to keep the pre-existing semantics of
`QMetaType::NeedsConstruction`. Before, the flag was set for types which
were not trivially default constructible. That included types that
aren't default constructible, or types that cannot do so trivially.
I've left that meaning unchanged, and simply amended the "trivial" part
with the custom trait. A fix there (to clarify the semantics) can be
done as a separate change.

Change-Id: Id8da6acb913df83fc87e5d37e2349a4628e72e91
Pick-to: 6.5
Fixes: QTBUG-109594
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-30 01:51:08 +01:00
Thiago Macieira
41b38c802b Fix improper ELF versions of certain symbols
They got marked as Qt6_PRIVATE_API because of these private header
defining classes that don't follow Qt's naming convention ("mutex",
"condition_variable", "ControlElement"). We have an exclusion for
classes whose name start with Q.

Introduced by 5d903a64ac in the old Perl
syncqt and ported over.

Pick-to: 6.5
Fixes: QTBUG-109605
Fixes: QTBUG-109604
Change-Id: I69ecc04064514f939896fffd173369623c960bcc
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-12-29 17:53:54 -03:00
Christian Ehrlicher
cb62cdbaa6 SQL: rework the connection options documentation (typos)
Fix some typos found after the initial commit for the connect options
documentation update

Change-Id: I9cf201363117a2f05e611c26a058f035fa945ddb
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2022-12-29 20:04:17 +01:00
Hannah von Reth
5b8d7d239c DB2: Fix typo in QMetaType
Change-Id: I6ada1fec3ce16670dd7346788db4e9c80ffae8d9
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2022-12-29 18:43:32 +01:00
Axel Spoerl
e29ffd3bd1 Fix size calculation of unplugged dock widgets
When unplugging a dock widget, it still grows by the separator size
when dragged upwards or to the left. The unplugged dock widget's size
can become too small to drag it or to access window handles.

This patch corrects the size offset for all drag directions. It expands
the target size to a minimum size, making sure that title bar and
window handles can be accessed after unplugging.

Fixes: QTBUG-106531
Pick-to: 6.5 6.4 6.2
Change-Id: Ie771a9338ebfb4c0eafd3b3b4205de730cbd20ac
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-12-29 14:53:50 +01:00
Axel Spoerl
c69e727274 Use minimum size for in tst_QDockWidget::createTestWidgets
tst_QDockWidget::createTestWidgets did not set a minimum size for
test widgets. Upon unplugging, that can lead to a size correction in
connection with 8687c3f938cac56c4a2518576a5c9fac150d8de1, if the widget
gets too narrow to correctly display window handles. Test functions
checking the size after unplugging can fail in that case.

This patch sets a minimum size to each test widget created. The minimum
size corresponds to QStyle::PM_TitleBarHeight.

Task-number: QTBUG-106531
Pick-to: 6.5 6.4 6.2
Change-Id: I3e552b37416d57d8ed30e0b9de4eec55f07ea158
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2022-12-29 13:53:40 +00:00
Marc Mutz
92e913a541 tst_QStringApiSymmetry: fix a typo and deal with the fallout
Turns out we don't support QStringView/QUtf8StringView comparison, and
the only reason the corresponding test succeeded was because it
contained a typo (QStringView instead of QUtf8StringView).

Fix the typo and disable the now-failing test.

Pick-to: 6.5 6.4 6.2
Change-Id: I2210a247aac66743851e53578172a563ee1e96f7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-29 12:20:27 +01:00
Morten Sørvig
8a20a278fa wasm: avoid LocalStorage past-the-end access on clear()
We were looping over all keys and removing the Qt keys
using an integer index. However, removing one key shifts
all other keys at higher indexes down one step such that
the loop eventually indexes past the end.

Fix this by getting the keys first in a separate step,
and then remove keys without relying on a stable iteration
order (which is also not guaranteed by the standard).

Pick-to: 6.4 6.5
Change-Id: I8bc577d1831d6931ebca2b2e04faf65c9affb429
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-12-28 18:14:44 +00:00
Morten Sørvig
ce560d28c8 wasm: fix up new configure options
Make options for enabling "simd128" and "exceptions" public:

    -feature-wasm-simd128
    -feature-wasm-exceptions

Make sure both appear in the config summary and feature
list. Move the exceptions code so that they are next to
each other in the cmake file.

Pick-to: 6.5
Change-Id: I3975b56703f40f7ffff270754535bc2eb5bfe488
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-12-28 15:57:48 +00:00
Morten Sørvig
b36e624c89 wasm: use public API for converting from Uint8Array
Use the new QByteAaray::fromUint8Array() function.

Change-Id: I7bb7a8184e1bfde2a89af2efb331db64f0b4d285
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
2022-12-28 17:57:48 +02:00
Lu YaNing
3c24bb026e QWidgetLineControl: Add missing emit keywords
Add emit keyword to avoid misunderstanding

Change-Id: Iec3a896b75769a0bbc791e186d335ed0f728434f
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2022-12-28 14:50:23 +00:00
Giuseppe D'Angelo
fddeec60cb Wait conditions example: fix an incorrect condition variable usage
3a449bbb69 amended the code to remove
acquiring a lock when waking up a condition variable. It is fine to
not have a lock associated when waking a condition variable; what I
misunderstood was the scope of the lock, which (and this underlines
the importance of commenting _what exactly_ a lock protects, for
each and ever lock) protected both the buffer as well as the counter
of the buffer. This made my reasoning flawed: it is necessary to keep
the lock while notifying, otherwise the counterpart could verify the
condition isn't satisfied and wait (e.g. see numUsedBytes==0), missing
the wake from the other thread (which could arrive between the check and
the wait).

Amends the previous commit.

Change-Id: If7db2d045331f1b33b976fb6bf6aa9117c41678f
Pick-to: 5.15 6.2 6.4 6.5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-12-28 15:10:40 +01:00
Morten Sørvig
41c10d4db8 wasm: update emscripten to 3.1.25
Qt 6.5 will require emscripten 3.1.25. This is not the
most recent version (3.1.27 at the time of writing),
however .26 and .27 make changes to stack layout and size
which require further investigation.

Change-Id: Ibe285ef160d450d6b2c63a7fb71d3561b0032e37
Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2022-12-28 13:37:01 +00:00
Morten Sørvig
fbf2a318dd wasm: align QWasmLocalFileAccess API with 6.4
This API is undocumented, but by keeping unchanged makes
it easier to use from external projects.

openFile(): Copy the accept/filter list parsing function
from 6.4. It makes sense to implement this behind the
API, so that user code doesn't have to reimplement it.

saveFile(): Slightly more complicated; the new variant which
takes a QByteArray is better since the implementation can
then keep a reference to the data for as long as it needs,
without copying the data. Add the const char * variant to
keep existing code going for now.

Adjust the calling code in widgets.

Pick-to: 6.5
Change-Id: I1899ebffdb90e40429dcb10313ccc5334f20c34f
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2022-12-28 13:21:37 +00:00
Axel Spoerl
7b64eb71c0 Detect appearance by colors unless GTK theme name contains "dark"
QGtk3Theme detects the appearance property by theme name: If the name
contains the keyword "dark", the theme is considered to be dark and
otherwise light.

This detection logic fails, when the GTK theme is dark without
containing the "dark" keyword, e.g. the dark theme "Adapta-Nokto".
While QGtk3Theme imports the right colors in that case, it wrongly
identifies a light theme.

This patch adapts the detection logic: If the theme name contains the
"dark" keyword, it is considered a dark theme without further checks.
If it doesn't, the current GTK3 theme's default background and
foreground colors will be read. If the foreground is lighter than the
background, the theme is considered dark. If the background is lighter
than the foreground, the theme is considered light. If both colors are
identical, the appearance will be Qt::Appearance::Unknown.

Task-number: QTBUG-93955
Pick-to: 6.5
Change-Id: I0e0f4870a1397b6a7918331a852284bb1c91199e
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2022-12-28 09:04:21 +01:00
Mikolaj Boc
988c7bfcae Fix the handling of dead keys on WASM
1) Do not attempt to take the first character of event.key when the
key is a dead key - this always returns D as in Dead
2) Do not attempt to immediately modify the pressed key with the dead
key as the dead key itself will be modified

Pick-to: 6.5
Fixes: QTBUG-109629
Change-Id: Ic66536b8b27df23c2f1c4ebf1c02e713990e62ef
Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-12-27 21:51:23 +01:00
Shreya Pattani
040b4a4b21 wasm: Work on wasm accessibility elements and events
Implement a11y support by adding html elements (Checkbox, Radio Button,
TabView,Spinbox, ScrollBar, Slider, Event for Button) and events of
the appropriate type and/or with the appropriate ARIA attribute
behind the canvas.

Pick-to: 6.5
Change-Id: I52902eae2bd4ac7a125815e1d2dd3077211fc118
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-12-27 14:30:25 +00:00
Sharad Sahu
13c3fd959e wasm: Work on wasm accessibility elements and events
Implement a11y support by adding html elements (Toolbar, Menu,
DialogBox) and events of the appropriate type and/or with the
appropriate ARIA attribute behind the canvas.

Pick-to: 6.5
Change-Id: If9c9fbff9a451b44e57de5d8834f4a78f33f41bc
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-12-27 14:30:25 +00:00
Morten Sørvig
42d4619967 wasm: add end-user accessibillty opt-in
We want to make support for screen readers available
incrementally to avoid destabilizing existing functionality.

Accomplish this by initially adding a single "enable
screen reader" button only. When pressed, this button
will remove itself and populate the page with the actual
accessibility elements.

Pick-to: 6.5
Change-Id: I65036d249c408d4dc1fa75e8c807d9b7300e4722
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-12-27 14:30:25 +00:00
Morten Sørvig
f4dd67461d wasm: add accessibility container to QWasmWindow
Add accessibility (a11y) container QWasmWindow. This
container should underlap the canvas with identical
geometry but ordered below.

Pick-to: 6.5
Change-Id: I7b91e3e69e3b1afa1b03ef7f7b7336e48f1a1594
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-12-27 14:30:25 +00:00
Marc Mutz
436501d877 QTextDocumentPrivate: de-inline {add,remove}Cursor()
In a 'ninja qtdeclarative' build, the addCursor() function alone is
compiled 458x for a total of almost 10s cumulative compilation time.

This makes it one of the top-20 template instantiations in a Clang
-ftime-trace build.

The removeCursor() function doesn't show up quite as much, but
de-inline, too, while we're at it.

Pick-to: 6.5
Task-number: QTBUG-97601
Change-Id: I37b920a8b364861efab78f736d71642dc82d8982
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-27 11:29:24 +01:00
Giuseppe D'Angelo
e5a7487c62 QTypeInfo: start moving away from isIntegral / isPointer
They offer no value over the traits in the standard library (in fact,
they're implemented precisely in terms of those traits).
This commit is done in preparation for their removal.

Change-Id: I3fb67e03e1c476f6ac0b369dfbbcf46b291270c8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-27 04:13:32 +01:00