Add the boilerplate standalone test prelude to each test, so that they
can be opened with an IDE without the qt-cmake-standalone-test script,
but directly with qt-cmake or cmake.
Boilerplate was added using the following scripts:
https://git.qt.io/alcroito/cmake_refactor
Manual adjustments were made where the code was inserted in the wrong
location.
Task-number: QTBUG-93020
Change-Id: I77299f990692b4fe4721a9bc35071608d0d23982
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Setting parents for WASM platform windows is now supported. This means
that windows now reside in a hierarchical window tree, with the screen
and individual windows being nodes (QWasmWindowTreeNode), each
maintaining their own child window stack.
The divs backing windows are properly reparented in response to Qt
window parent changes, so that the html structure reflects what is
happening in Qt.
Change-Id: I55c91d90caf58714342dcd747043967ebfdf96bb
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
The polyfill for file input on WASM now makes use of the supplied
filter list.
Some changes were introduced in the abstraction for filters so that
they are usable both for the new file API and the legacy file input.
Change-Id: Id6341be4d6a1647e17382d13da7be42491cfaf80
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
The window stack will now upkeep three groups of windows, always
on bottom (1), regular (2), always on top (3). Windows belonging to
(3) will always appear on top of (2) and (1), and windows from (2) will
always appear on top of (1).
The first window created in the application gets the (1) status, which
is in line with the root window mechanism used before.
Activation has now been decoupled from the top position on the window
stack as a window in (1) or (2) may be active, in spite of the top
window belonging to a higher group.
Fixes: QTBUG-110098
Change-Id: I51f4d2d47163fab26ce5ef28f7a4f23a522c7f91
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
An effort has been made to support more keyboard layouts that provide
dead keys (US international, Mac-specific dead keys).
The dead key is translated now at the event conversion phase, not
when it is actually used for modifying keys, which simplifies the logic.
Unittests have been created to check the translation mechanism.
Fixes: QTBUG-86272
Change-Id: I07f7d63f5a37f8469c693b034b400da99379f519
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
The method should by contract return nullptr when the stack is empty,
but it crashes in this case.
Also, unit-test the case.
Pick-to: 6.4
Change-Id: If64b71e761efd9a5cd5af407cd68cba7f8dbc8e2
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Use consistent defines across both tests in the directory
Change-Id: Idd84603135c8c164d09ae41d5faa7ca3a5fc7c3c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
- Moved the modal window resolution to
QWasmWindow::requestActivateWindow so that multiple async activation
events are not issued in unpredictable patterns.
- Request activation on added windows and on stack top in case of
window removal
Pick-to: 6.4
Change-Id: I6f02cf1b7e83abb7961caf311ffc83e91c8bf810
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
The old stack structure used to keep track of windows has been improved
to conform to the actual windowing assumptions: there shall be one root
window, which is always at the bottom. The first created window
immediately becomes the root window. Should the root window be removed,
all windows are non-root, i.e. any of them can become the top-level window
Fixes: QTBUG-105094
Pick-to: 6.4
Change-Id: Ic553244fa9f5bc3ee590b702935e66cfc62d5f8f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
CMakeLists.txt and .cmake files of significant size
(more than 2 lines according to our check in tst_license.pl)
now have the copyright and license header.
Existing copyright statements remain intact
Task-number: QTBUG-88621
Change-Id: I3b98cdc55ead806ec81ce09af9271f9b95af97fa
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
The promise tests have been ported to qtwasmtestlib so that they do not
have to use asyncify anymore.
Task-number: QTBUG-99611
Change-Id: Id1b5742c90e36a89540e7a2387cb4110c21ace9b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
As a preparatory measure for using showXFilePicker, the Qt file
filter has to be transformed to the format used by the showXFilePicker
(sXFP) options. A class structure reflecting the options was created. Based on
an input in the form of a qt file filter, it will parse the filter to
the sXFP options format. Unit tests were added and the code is not yet
used in non-test env, next change will use it.
Task-number: QTBUG-99611
Change-Id: I277286467a7b5ce6f323c19bdd31740a41b6a6be
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Currently, to use a promise from C++ we either have to use an ASM block
(which does not work well with dynamic linking) or declare exports in
the EMSCRIPTEN_BINDINGS block, which is cumbersome and cannot be chained.
This solution makes it easy to use js promises by introducing the
WebPromiseManager which dispatches callbacks to appropriate callers when
available.
This is a preliminary patch for FileSystem support, which will heavily
use async APIs.
Task-number: QTBUG-99611
Change-Id: I368a8f173027eaa883a9ca18d0ea6a3e99b86071
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>