Commit Graph

1061 Commits

Author SHA1 Message Date
Laszlo Agocs
9f3d6e325f Make contextinfo example a manual test
Change-Id: I9023016d50e82bba1fa73632cc1409b3d016f352
Reviewed-by: Kristoffer Skau <kristoffer.skau@qt.io>
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2023-11-17 22:27:01 +01:00
Piotr Wierciński
d544c0ff58 wasm tests: Fix and clean manual Selenium test
Remove obsolete parent_window_limits_moves_of_children test of moving
child window in parent. Child windows no longer have decorations,
therefore they cannot be dragged by a title bar.
Fix child_window_activation test, which now uses correct coordinates
to probe for stacked windows.

Change-Id: If5ddd8d4486673a961572de7c57df72c3cea9350
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-11-08 18:24:18 +01:00
Piotr Wierciński
105a8d90bc wasm tests: Fix manual Selenium tests
Manual tests using Selenium for browser automation were not properly
updated when we introduced changes to our DOM structure.
Update the testing framework so elements in shadow root may be
properly accessed.

Change-Id: I45f7d63a833bc48a3b68016ef937e56425bdff87
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2023-11-06 11:56:25 +01:00
Shawn Rutledge
83b592346b Modify the MDI manual test to allow multiple views of same document
- editing same document in different views is possible? yes
- resizing one QTextEdit calls QTextDocument::setTextWidth(), which
  affects the width in the other view too. You can resize either one,
  but you can't have two views with different layouts, of course.

Added a categorized log message in QTextDocument::setTextWidth()
for a sanity check.

Task-nunber: QTBUG-35688
Change-Id: I59c4d10143fda3a66b946237832274d67f9d9d45
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-11-02 20:49:32 -07:00
Morten Sørvig
fde6bdfc5a wasm: add QIODevices for accessing JS data
BlobIoDevice: Supports reading data from a JS Blob,
which can be a File (on disk) or some other object
which can provide data. The native access functions
are async and using this class requires that asyncify
is available.

Uint8ArrayIODevice: Supports reading and writing to
a Uint8Array / ArrayBuffer. Similar to the existing
QByteArray::fromEcmaUint8Array() API, except that it
supports incremental accesss.

Change-Id: Ic5de3534ff75eb6c745287b73b15ccd92d74ac2c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-10-25 17:56:55 +02:00
Øystein Heskestad
fd48ce0b73 Add support for containers > 4 Gi elements in QDataStream
The format is changed from 6.7 to support more than UINT32_MAX - 1
elements. The format used to have a quint32 size. Now if the size is
larger or equal to 0xfffffffe (2^32 -2) the old size is an extend
value 0xfffffffe followed by one quint64 with the actual value. The
32 bit size with all bits set is still used as null value.

Fixes: QTBUG-105034
Change-Id: I62188be170fe779022ad58ab84a54b1eaf46e5d9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-10-23 15:10:28 +02:00
Volker Hilsheimer
61ceff89f7 Replace MAKE_TAG macro with QFont::Tag
Task-number: QTBUG-117046
Change-Id: I26e0af634fed87199bb49d57e3aa3f4e3fea0e39
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2023-10-20 21:37:02 +02:00
Assam Boudjelthia
028a31b505 Android: remove unneeded allowNativeHeapPointerTagging manifest flag
Amends b0907db9eae4b85fcab4fa997428c438d9443ee0.

Pick-to: 6.5 6.6
Task-number: QTBUG-91150
Change-Id: Ic7886a9fc69781e4f21417075516106ccb6c7bf5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-10-20 18:46:29 +03:00
Tor Arne Vestbø
7152a1d0be Add missing static to constexpr in keyevents test
Change-Id: I9e83876aadca3254042eb48ed51287e403830cf0
Reviewed-by: Liang Qi <liang.qi@qt.io>
2023-10-17 23:34:22 +02:00
Thiago Macieira
b470da9107 tst_QStorageInfo: align the columns without newlines
Change-Id: I9d43e5b91eb142d6945cfffd17874a50565a97d6
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-10-15 18:37:07 -07:00
Shawn Rutledge
8e0bf6e05b Make tests/manual/qtabletevent/device_information build standalone
It's very hard to test on Android otherwise: Creator isn't cooperating
well enough with Android Studio / SDK manager with where stuff is
installed, qmake doesn't build an apk, and qt-cmake-standalone-test
doesn't work wth Android either.

Renamed the executable to tablet_device_info so it's a bit less
confusing on device launcher UIs.

Task-number: QTBUG-86297
Change-Id: I3bb7f816e43f8df4183be1c0866e228befa9e8d9
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2023-10-10 18:27:22 +02:00
Ahmad Samir
032ffb70a8 QAbstractSocketEngine: port to QDeadlineTimer
qnativesocketengine_win.cpp: don't check if timeout is < 0, because
remainingTimeAsDuration() doesn't return negative values.

All the changes done in one go, not function by function, as that causes
the least churn. You can think of them as a couple of very similar
changes repeated various times.

Drive-by change: replace `forever {` with `for (;;)`

Task-number: QTBUG-113518
Change-Id: Ie9f20031bf0d4ff19e5b2da5034822ba61f9cbc3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-10-07 02:28:12 +03:00
Tor Arne Vestbø
5fce4ff2c2 keyevents test: Force left to right when outputting key combinations
Otherwise characters in right to left languages like Hebrew might
mess up the output.

Change-Id: I8753e7e672159ed515dc6152c3629adf91cfd4a9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2023-10-06 15:48:46 +02:00
Christian Ehrlicher
4e8b54eb81 Preparations to deprecate QItemDelegate
QItemDelegate was superseded since Qt4 by QStyledItemDelegate but it
took until Qt6.7 to remove the last occurrences in qtbase.
 - remove unused includes / replace with qabstractitemdelegate.h
 - replace references in the documentation with QStyledItemDelegate
 - adjust the examples and tests to use QStyledItemDelegate

Pick-to: 6.5 6.6
Change-Id: I246755004ce2d01192a726ca0972106c237df0cc
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2023-10-05 21:08:45 +02:00
Hatem ElKharashy
888016a53f Fix compilation error for QRhi stereo manual test
Add a guard to prevent compilation error on
non-Windows platform

Change-Id: Ibe0d74c1dfe3d4656addeb80c702b6e254d37d84
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Kristoffer Skau <kristoffer.skau@qt.io>
2023-10-05 08:18:01 +00:00
Rym Bouabid
b956fec7ee Remove Custom Type Example and Custom Type Sending Example
The whole Q_DECLARE_METATYPE part is superfluous in these two examples,
as QVariant works with any type as long as it is copy-constructible.
And QVariant will call the equivalent of qRegisterMetaType, so that
doesn't need to happen, either.
Showing how to integrate the type with qDebug is fine in theory, but
also a repetition of content that can be found in other places.

Given that there isn't much else being shown in these two examples, it's
better to remove them from examples and move them to manual tests.

Some parts of "Custom Type Example" were used as snippets in other
documentations under qtbase/src/corelib. So, they were added in
customtypeexample.cpp file in the snippets folder.

Fixes: QTBUG-117001
Pick-to: 6.6 6.5
Change-Id: I45b16338912e3f7394cbb5169642bd31af32d5e1
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-10-04 21:04:45 +02:00
Tor Arne Vestbø
ca68fa01fe Add key events manual tests
Task-number: QTBUG-116873
Change-Id: I70c0199fa6244addf0f282aa8856935e3486270a
Reviewed-by: Alexis Murzeau <amubtdx@gmail.com>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2023-09-27 17:47:19 +02:00
Alexandru Croitor
bf2587d9e5 CMake: Update the ios assets manual test
- provide an asset catalog .json file for both Xcode 13 and 14
  formats. Apps built against the Xcode 13 SDK are not validated
  anymore by the App store, but it's still useful to see how things
  were before.

- Xcode 13 required the following icon sizes for a universal iOS app:
   60x60@2x, 76x76@2x\~ipad, 167x167, 1024x1024

- Xcode 14 only needs the 1024x1024 one

- icons need to be embedded into the asset catalog starting with iOS
  11 according to Apple docs (not sure which Xcode version, but it's
  needed for both Xcode 13 and Xcode 14), and they don't have to
  manually be copied into the bundle anymore, Xcode takes care of
  that when processing the asset catalog

- add an 167x167 icon image for the iPad pro for Xcode 13

- add an 1024x1024 icon image that is required for successful app store
  submission and embed it into the asset catalogs

- for Xcode 13, we need to manually specify all the required icon
  sizes

- for Xcode 14 we can rely on Xcode to generate the smaller icons from
  the big one

- because the icons need to live in the asset catalog folder, remove
  unnecessary icons in the appicons folder.

- for the cmake project, make sure the asset catalog compiler generates
  the icons by setting the
  XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME attribute
  qmake does automatically already.
  it would be nice if we can do that automatically in a future Qt
  version

- remove unused icon references in Info.plist file with Xcode 13

- remove all icon references in Info.plist with Xcode 14, rely on Xcode
  to add that info via its generated partial Info.plist file that gets
  merged into the main one.

- don't include CMakeLists.txt as a text resource

Amends cf3535fdf2

Pick-to: 6.5 6.6
Task-number: QTBUG-104519
Task-number: QTBUG-110921
Task-number: QTBUG-116784
Change-Id: I0bc556e66647a66bc21402ea62db3374d0970e97
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-09-22 20:40:36 +02:00
Alexandru Croitor
370962315a CMake: Fix incorrect UILaunchStoryboardName value in Info.plist
The value needs to be 'CustomLaunchScreen', not
'CustomLaunchScreen.storyboard', otherwise app store validation will
fail with the following error:

 Asset validation failed
 Invalid bundle. Because your app supports Multitasking on iPad, you
 need to include the CustomLaunchScreen.storyboard launch storyboard
 file in you bundle. Use UILaunchScreen instead if the app’s
 MinimumOSVersion is 14 or higher and you prefer to configure the
 launch screen without storyboards.

This brings the value in line with what we have for the qmake
Info.plist file.

Amends cf3535fdf2

Pick-to: 6.5 6.6
Task-number: QTBUG-104519
Task-number: QTBUG-110921
Task-number: QTBUG-116784
Change-Id: I4e9cc2ed685634544955e967f35fdc426dac0f0c
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-09-22 20:40:36 +02:00
Alexandru Croitor
528e70b6d9 CMake: Add CFBundleIconName key to ios assets manual tests
It is required for publishing an app to the app store. Otherwise during
app store validation phase, you get an error:

 Asset validation failed
 Missing Info.plist value. A value for the Info.plist key
 'CFBundleIconName' is missing in the bundle 'foo'. Apps built with
 iOS 11 or later SDK must supply app icons in an asset catalog and must
 also provide a value for this Info.plist key.
 For more information see
 http://help.apple.com/xcode/mac/current/#/dev10510b1f7.

Note this is not needed when using Xcode 14.3+ and when one places the
icons into an asset catalog. When processing icons in the asset
catalog, Xcode generates a partial Info.plist file that will contain
the CFBundleIconName key and will merge into the final Info.plist
file.

Amends cf3535fdf2

Pick-to: 6.5 6.6
Task-number: QTBUG-104519
Task-number: QTBUG-110921
Task-number: QTBUG-116784
Change-Id: I53009097cf27b096c72ee9c4bad6aa4286272061
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
2023-09-22 20:40:35 +02:00
Hatem ElKharashy
8dee03500e Add Manual test for Graphics Frame Capture
Simple window with a rotating rectangle that can be
captured using QGraphicsFrameCapture.

Task-number: QTBUG-116146
Change-Id: Ia3b6928e469d926c53260ee40ed5af97dd280c08
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
2023-09-20 10:51:55 +03:00
Tor Arne Vestbø
5ce4aecd49 embeddedwindows: Mask the painting manually by applying a clip
QWindow::setMask() is not guaranteed to turn the masked out areas
transparent, and it's up to the client to ensure this during
painting.

Pick-to: 6.6
Change-Id: I1155b3ad095152a993532f2290cacb670e20daa7
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-09-12 16:30:02 +02:00
Tor Arne Vestbø
61c043333b embeddedwindows: Fill bounds, instead of event rect
The event might come from a partial expose, but we want to
fill the entire bounds of the window, as we're filling with
a gradient.

Pick-to: 6.6
Change-Id: I66cedb160fb0ed06935c06ba2fe5dec9ed468833
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2023-09-12 16:30:00 +02:00
Shawn Rutledge
63eaa3a989 Add manual test for QTextCursor::insert*
Visualize what's going on with tst_QTextCursor::insertMarkdown() at least.
But this could be expanded for other purposes.

It's also interesting to test drag-and-drop with this. And you can save
the result to any supported text format.

Change-Id: I363c32ff9b1bd7c53c562b08c58de95a69be0aa9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2023-09-12 06:20:23 +01:00
Tor Arne Vestbø
3cb3c1d9a8 xcb: Implement native window helper for embeddedwindows/foreign window test
Pick-to: 6.6
Change-Id: I73720f8f49a5d7e5df7c95bf4b17ef910180e01c
Reviewed-by: Liang Qi <liang.qi@qt.io>
2023-09-12 02:47:24 +02:00
Edward Welbourne
54c2383e81 Add _tzset() call before mktime() on MS
Add a change-of-zone manual test, based on a bug-report by Felix
Kälberer. This failed: debugging revealed that MS's mktime() doesn't
pick up a change to system zone.

Fixes: QTBUG-83881
Change-Id: I9b86398ef870627a059e269f85a0f5d9d9de284b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-09-05 22:41:35 +02:00
Ilya Doroshenko
1eb15adee3 Add stereo support for DirectX12 and Vulkan backends
Change-Id: Id12723d6c392e25935ccb265c58af91aff968984
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-09-05 10:28:42 +00:00
Marc Mutz
11d6932560 Mark all of Qt as free of Q_FOREACH, except where it isn't
The density of Q_FOREACH uses in this and some other modules is still
extremely high, too high for anyone to tackle in a short amount of
time. Even if they're not concentrated in just a few TUs, we need to
make progress on a global QT_NO_FOREACH default, so grab the nettle
and stick to our strategy:

Mark the whole of Qt with QT_NO_FOREACH, to prevent new uses from
creeping in, and whitelist the affected TUs by #undef'ing
QT_NO_FOREACH locally, at the top of each file. For TUs that are part
of a larger executable, this requires these files to be compiled
separately, so add them to NO_PCH_SOURCES (which implies
NO_UNITY_BUILD_SOURCES, too).

In tst_qglobal.cpp and tst_qcollections.cpp change the comment on the
#undef QT_NO_FOREACH to indicate that these actually test the macro.

Task-number: QTBUG-115839
Change-Id: Iecc444eb7d43d7e4d037f6e155abe0e14a00a5d6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-08-19 05:19:42 +00:00
Laszlo Agocs
55c79dcc25 rhi: add a way to test Display P3 with the manual test
Extended linear Display P3 + FP16 is likely the thing to use
on platforms such as VisionOS and iOS (and optionally on macOS)
and perhaps iOS). Enable testing this on macOS with the hdr
manual test.

Change-Id: I67f0bdbadae8c7ebccae7de008f12fd8d9135529
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2023-08-15 15:10:35 +02:00
Marc Mutz
f2f8820073 tests: port assorted trivial uses of Q_FOREACH to ranged for loops
All of these fall into the trivial category: loops over (readily made)
const local containers. As such, they cannot possibly depend on the
safety copy that Q_FOREACH performs, so are safe to port as-is to
ranged for loops.

There may be more where these came from, but these were the ones that
stood out as immediately obvious when scanning the 100s of uses in
qtbase, so I preferred to directly fix them over white-listing their
files with QT_NO_FOREACH (which still may be necessary for some files,
as this patch may not port all uses in that file).

Pick-to: 6.6 6.5
Task-nubmber: QTBUG-115839
Change-Id: I7b7893bec8254f902660dac24167113aca855029
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-08-14 23:11:54 +03:00
Laszlo Agocs
72a453c6a8 Add QRhiWidget
Task-number: QTBUG-113331
Change-Id: I8baa697b4997b05f52acdee0e08d3c368fde5bc2
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-08-14 17:05:36 +02:00
Marc Mutz
cc15e42e2c embeddedintoforeignindow test: port itemwindow.h away from Q_FOREACH
As a header, it would otherwise make all TUs that include it (with
PCH: all) incompatible with QT_NO_FOREACH.

Without deeper analysis (which economy of time forbids in this case,
given this is just a manual test that's probably run 10 times per
year), and seeing as this is in an event handler, I opted to play it
safe and iterate over a copy (which is exactly what Q_FOREACH
does). Added a comment to indicate it may not be needed.

Pick-to: 6.6 6.5
Task-number: QTBUG-115839
Change-Id: I7db75321dd34888f6dd7a64cccb7462ff35935fa
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-08-09 23:57:22 +02:00
Marc Mutz
bb11f7a9fa QStorageInfo manual test: port away from Q_FOREACH
In main.cpp, the loop is over a local variable which would be const
were it not for the multi-step initialization that I didn't want to
change. The loop body clearly doesn't modify the container, so port to
ranged for loop with std::as_const().

In printvolumes.cpp, the loop _does_ invoke unknown code (through the
function pointer passed as the second argument), but, as could be
expected, the two users of the function don't pass functions that know
about `volumes`:

- in the tst_QStorageInfo auto-test, an rvalue `volumes` is passed,
  so we don't need to analyze the qInfoPrinter function passed there,
  as it cannot possibly reference the temporary

- and in main.cpp of the manual test, we just pass printf (which is
  technically UB (taking the address of a standard library function),
  but I don't care right now).

Pick-to: 6.6 6.5
Task-number: QTBUG-115839
Change-Id: Ibcd10a0e0b3229d8f2a1d98545d8fa6d473a0f75
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2023-08-08 23:46:08 +00:00
Marc Mutz
ba4b88d9d2 QSslSocket manual test: replace QList with const array
"Never use a dynamically-sized container for statically-sized data."

Port the loop from Q_FOREACH (which can't deal with arrays) to ranged
for (which can).

Pick-to: 6.6 6.5
Task-number: QTBUG-115839
Change-Id: Ib89d07fb751e3905a230ee5641e2e509e9415bed
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-08-08 18:57:40 +02:00
Tor Arne Vestbø
5cf3d062f6 Fix embeddedwindows test on platforms without native window helper
Pick-to: 6.6
Change-Id: I33074fc4a04982075a8c264bad41c56235e98cb6
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
2023-08-08 18:15:22 +02:00
Marc Mutz
c0738f9ff0 manual repaint test: port away from Q_FOREACH
The Q_FOREACH is in a header, so we need to port away from it,
otherwise it makes any TU that includes it (in PCH builds: all)
incompatible with QT_NO_FOREACH.

This is a trivial case of marking the local constructor const, but go
a step further and replace the QList with a C array ("never use a
dynamically-sized container for statically-sized data"). Both
consumers of the container (after s/foreach/for/) can deal with array.

Pick-to: 6.6 6.5
Task-number: QTBUG-115839
Change-Id: I142e438dcf2d785bb34022a3fb1ff46b8eaa0edd
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-08-08 17:08:00 +02:00
Tor Arne Vestbø
be03c9f1d9 Add embeddedwindows manual test
For the child windows we have to use showNormal() explicitly,
as the default window state logic of platforms like iOS does
not have access to the QWindow, only to its flags, and we
can not use Qt::SubWindow as a proxy for being a child window,
as that's a window flag meant to be used for MDI sub windows.

Pick-to: 6.6
Change-Id: I2b5e669f6180ffdcb75479dece38ae5e5430aef6
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-08-07 22:59:19 +02:00
Laszlo Agocs
547b9da7ad rhi: Enhance the hdr info struct and add a manual test
...while sharing the related code between the d3d backends.

The isHardCodedDefaults flag is not used in practice and is
now removed. Add the luminance behavior and SDR white level
(for Windows) to help creating portable 2D/3D renderers that
composite SDR and HDR content. (sadly the Windows HDR and Apple
EDR behavior is different, as usual)

The new test application is expected to run with the command-line
argument "scrgb" or "sdr". It allows seeing SDR content correction
(on Windows) in action, and has some simple HDR 3D content with
a basic, optional tonemapper. Also shows the platform-dependent
HDR-related screen info. With some helpful tooltips even.

Additionally, it needs a .hdr file after the 'file' argument.
The usual -d, -D, -v, etc. arguments apply to select the 3D API.

For example, to run with D3D12 in HDR mode:

hdr -D scrgb file image.hdr

The same in non-HDR mode:

hdr -D sdr file image.hdr

Change-Id: I7fdfc7054cc0352bc99398fc1c7b1e2f0874421f
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2023-08-03 12:17:25 +02:00
Mikolaj Boc
6213f6565c Move the selenium qwasmwindow test to the selenium dir
This is done in anticipation of another test for dragging

Change-Id: I56961eb1d16a4a6b6c58890c9c882dea813dfa08
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
2023-07-24 12:32:35 +02:00
Mikolaj Boc
2b02ca445e Use new entry function name in qwasmwindow test
Use qwasmwindow_harness_entry instead of the old createQtAppInstance.

Change-Id: I381dd43d9144fe70f055c19db4cd95f90313883b
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
2023-07-24 12:32:35 +02:00
Morten Sørvig
a4d1c30a1b wasm: clarify qtloader onExit behavior
onExit is called whenever the application exits, i.e.
when the app canvas should no longer be displayed and
the loader/embedder code should take some action.

Emscripten provides two callbacks which can be used
here:
  - onExit, called when the app exits (but see EXIT_RUNTIME)
  - onAbort, called on abort errors.

These map to the two cases Qt's onExit supports. onExit
is not called when EXIT_RUNTIME is disabled, which means
we don't need the special case for exit code 0.

In addition call onExit on any exception. The second
call to showUi() in html_shell.html is then not needed
any more and we avoid duplicating the UI state handling
in user code.

Update the qtloader_integration test to handle changes in
behavior (we no longer set the error text on exit). Use
emscripten_force_exit() to simulate application exit -
using this function makes Emscripten call onExit even
when EXIT_RUNTIME is disabled.

Pick-to: 6.6
Change-Id: I72b5463c1836e8d5054e594abbd304fbc67032b7
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
2023-07-10 05:13:56 +02:00
Morten Sørvig
64007c7497 wasm: add "preload" qtloader config property
Add support for downloading files from the web server
to the in-memory file system at application load time.

See included documentation for usage.

This preload functionality is different from Emscripten's
--preload-file and --embed-file in that the files are
not packed to a single data file or embedded in the
JavaScript runtime. Instead, the files are downloaded
individually from the web server, which means that they
can be cached individually, and also updated individually
without rebuilding the application.

Any file type can be preloaded. The primary use case
(at the moment) is preloading Qt plugins and QML imports.

Pick-to: 6.6
Task-number: QTBUG-63925
Change-Id: I2b71b0d6a2c12ecd3ec58e319c679cd3f6b16631
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-07-04 13:42:01 +00:00
Tor Arne Vestbø
72a153a7f5 Move simple widget mapper example to manual test
Pick-to: 6.5 6.6
Change-Id: I703843b5ee935794c2e2fd0407f9a1508b088ab6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-06-30 08:51:06 +02:00
Tor Arne Vestbø
8937169c19 Move simple dom model example to manual test
Pick-to: 6.5 6.6
Change-Id: I33120e3f6217ea52bdfdebea8b5faa79d9d3fd68
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-06-30 08:51:02 +02:00
Tor Arne Vestbø
9c71b92430 Move plug and paint example to manual test
Pick-to: 6.5 6.6
Change-Id: Ibfd870f2f879d6ae68cd6806b0c1ab02da0a3441
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-06-30 08:50:59 +02:00
Tor Arne Vestbø
921337f98c Move pixelator example to manual test
Pick-to: 6.5 6.6
Change-Id: I3ce2bc269a9f77bce3dd41f0127d01091c1408f6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-06-30 08:50:55 +02:00
Tor Arne Vestbø
5654fbffd5 Move dials example to manual test
Pick-to: 6.5 6.6
Change-Id: Ib99a3890b814c2089db62485f0a10cf308ff9b66
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-06-29 14:49:14 +02:00
Tor Arne Vestbø
81db1766dd Move textedit example to manual test
Pick-to: 6.5 6.6
Change-Id: Ic3189044598be8e121c1f065e68e04a3547a87d0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-06-29 14:49:13 +02:00
Tor Arne Vestbø
40dbee13eb Move tetrix example to manual test
Pick-to: 6.5 6.6
Change-Id: Ie73d9e35df8513d05d55ffbad1f02584359e3bd0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-06-29 14:49:13 +02:00
Tor Arne Vestbø
89b463ac2f Move styles example to manual test
Pick-to: 6.5 6.6
Change-Id: I5738932c0c498ce2075a399274e3b80a04ad9211
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-06-29 14:49:13 +02:00