Commit Graph

14140 Commits

Author SHA1 Message Date
Tor Arne Vestbø
1ecfc4101c tst_qgraphicswidget: Avoid redeclaration of Size from MacTypes.h
If an included header brings in MacTypes.h it will cause issues,
so rename the enum to be on the safe side.

Pick-to: 6.4 6.3 6.2
Change-Id: I29ec795be74a65d4f2267d8121a514bf192cf969
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-08-21 14:40:38 +02:00
Volker Hilsheimer
3be99799a6 Don't access QObjectPrivate::declarativeData unguarded
The QObjectPrivate::declarativeData member is stored in a union with
currentChildBeingDeleted. The QObject destructor always sets the
currentChildBeingDeleted member of the union. It also sets the
isDeletingChildren bool, which is the only way to find out which union
member we can safely access.

While the QObject destructor is deleting children and isDeletingChildren
is set, we must not access the declarativeData member of the union.

Add a test case that initializes the function pointers for the
declarative handlers and constructs a situation where an object
emits a signal while it is destroying children.

Fixes: QTBUG-105286
Pick-to: 6.4 6.3 6.3.2 6.2 5.15
Change-Id: Iea5ba2f7843b6926a8d157be166e6044d98d6c02
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-08-20 03:55:12 +02:00
Mårten Nordheim
50f8a9578d QSslServer: Re-enable read notifications when a client times out
Otherwise new clients will not be handled when they try to connect

Amends 29a1fe72a0

Pick-to: 6.4
Change-Id: Ifff052d1bf27682df2782faa285a257c9b41d86f
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-08-19 23:53:11 +02:00
Ivan Solovev
3226c82740 Rename QT_DISABLE_DEPRECATED_BEFORE -> QT_DISABLE_DEPRECATED_UP_TO
The new name describes the behavior in a better way.

[ChangeLog][Build System] The QT_DISABLE_DEPRECATED_BEFORE macro is
renamed to QT_DISABLE_DEPRECATED_UP_TO. The old name is deprecated, but
is still recognized if it is defined during configuration and the new
name is not defined.

Task-number: QTBUG-104944
Change-Id: Ifc34323e0bbd9e3dc2f86c3e80d4d0940ebccbb8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-08-19 23:52:05 +02:00
Tatiana Borisova
6a3509baa2 Put code related to timezone functionality under QT_CONFIG(timezone)
Pick-to: 6.4 6.3
Change-Id: I0d1573dbb4ae4f9740fc19546950ae4316aa4c0c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-08-18 18:05:09 +00:00
Assam Boudjelthia
78c8561658 Android: skip tst_qvulkan vulkan11() and vulkanWindowGrab()
This fails on Android 12 in CI.

Task-number: QTBUG-105739
Pick-to: 6.4 6.3 6.2
Change-Id: Ibf3deb6b84564f12b5172f2522875fe70f8ce87b
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-08-18 10:52:14 +00:00
Assam Boudjelthia
0fb59d68f7 Android: skip tst_qopengl::fboRenderingRGB30()
This fails on Android 12 in CI.

Task-number: QTBUG-105738
Pick-to: 6.4 6.3 6.2
Change-Id: I94fcefae3d88087cd96f4043b015f9469ed629a9
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-08-18 10:52:10 +00:00
Assam Boudjelthia
d1e97ada4e Android: skip tst_QPluginLoader::loadSectionTableStrippedElf()
... on Android 7+ because Android linker doens't accept missing or
bad section headers.

* https://android.googlesource.com/platform/bionic/+/refs/heads/oreo-r2-
release/android-changes-for-ndk-developers.md#missing-section-headers-
enforced-for-api-level-24

Pick-to: 6.4 6.3 6.2
Task-number: QTQAINFRA-4748
Change-Id: I37fcf7995bbfe7d258b92f7425baf4722b0ad4ab
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-08-18 13:52:06 +03:00
Assam Boudjelthia
cf4f147c23 Android: tst_QByteArray::base64_2GiB() times out or gets terminated
Android kills this test case which tries to use too much memory,
or it times out.

Pick-to: 6.4 6.3 6.2
Task-number: QTQAINFRA-4748
Change-Id: Ifce92533d50f4c463ee10fe80e7654ad16172a35
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-08-18 13:52:02 +03:00
Assam Boudjelthia
7c917a6dbf Android: skip crahsing tst_QFile's unixPipe() and socketPair()
... on Android 12.

Task-number: QTBUG-105736
Pick-to: 6.4 6.3 6.2
Change-Id: I1a67ef34e2f3918d96bdcfdcde48c1c14fe01c2e
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-08-18 13:51:58 +03:00
Assam Boudjelthia
2c6e71e562 Android: fix Android filedialog and completer tests
* https://developer.android.com/training/data-storage/use-cases#opt-out-
in-production-app

Pick-to: 6.4 6.3 6.2
Task-number: QTQAINFRA-4748
Change-Id: If6abb48b730b9b33807f5f6648e1360defc090a6
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-08-18 10:51:54 +00:00
JiDe Zhang
a6b55b3c46 Allow specify distance to plane for QTransform
The default camera to plane distance is 1024, when rotating a big image
along the x or y axis, some areas of the screen may move above the
camera, causing the rotation to fail. A new rotation interface has been
added to allow users to specify the distance from the camera to the
plane themselves when rotating the QImage. Also, this support has been
added to QMatrix4x4::projectedRotate.

[ChangeLog][QtGui][QTransform] Added overloads to rotate() and
rotateRadians() that allow specifying of the distance to the rotation
plane.

Fixes: QTBUG-105088
Change-Id: I81f629916ddd9b6ab84e0282191e4284a88a85f5
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2022-08-18 10:40:42 +08:00
Volker Hilsheimer
371214dea7 Remove network dependency for tests with UNC paths
Windows VMs are provisioned with shared folders that are available as

\\${COMPUTERNAME}\testshare(writable)

so we don't need to access a remote SMB server over network anymore just
to test whether our string-parsing code handles UNC paths correctly.

Add a QTest::uncServerName() helper function to the shared filesystem.h
header and use that instead of QtNetworkSettings::winServerName. The
latter is now only used in tst_NetworkSelfTest::smbServer().

Pick-to: 6.4
Change-Id: Id0da66369ad0f4a980d612de2a31a391f1192253
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-08-17 23:48:00 +02:00
Mårten Nordheim
1ee75e4740 QSslServer: Make sure maxPendingConnections applies to all sockets
Not just the ones we added to the pending sockets list

Pick-to: 6.4
Change-Id: I0a0016fe39df7ca2fc3f0c4e4111195bc6d90198
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-08-17 21:55:19 +02:00
Mårten Nordheim
29a1fe72a0 QSslServer: Implement handshake timeouts
If a client doesn't send any data then we would leave the socket open
for as long as it needed, wasting resources. Add timeouts to limit the
amount of time this can happen for.

Since there is a limit on number of sockets that the server will have
queued, having idle sockets stick around forever is a vector for ddos.

Pick-to: 6.4
Change-Id: Ida6251c92c625eeadf2065861b840b14255654b8
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-08-17 21:55:19 +02:00
Mårten Nordheim
1b68e0b717 QSslServer: Check that first byte is ClientHello
SecureTransport ignores any content that comes in until it is large
enough to be a handshake. So a plaintext client may be left hanging
while it is waiting for a response.

Pick-to: 6.4
Change-Id: I501ae61d89d516765c7ba5f0d916d9246fde5d4d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-08-17 19:55:18 +00:00
Alexandru Croitor
9e3e167223 CMake: Add simple widgets qmake iOS build test
Build a simple widgets qmake project when targeting iOS in the CI.
This ensure we don't introduce basic regressions in the .pri / .prl
file generation.

Make sure to target the ios simulator, so we don't require any
code signing or provisioning profiles.

Pick-to: 6.4
Fixes: QTBUG-96058
Change-Id: I1a5564e838a5ce3cac89a37a5a4ddee74d3400f3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-08-17 21:21:57 +02:00
Sona Kurazyan
e684c25b85 QDomDocument: deprecate old setContent() overloads in favor of new ones
And use the new overloads in examples and tests.

[ChangeLog][QtXml][QDomDocument] Deprecated the old setContent()
overloads in favor of the new ones that take ParseOptions and
ParseError.

Task-number: QTBUG-104507
Change-Id: I61b37eba2fe3002c03bddc90f6877676d539f7ec
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-08-17 17:02:27 +02:00
Morten Sørvig
4d6decf628 wasm: always build asyncify tests for eventloop_auto
Add a runtime test for asyncify availability; skip tests
if asyncify is not available. Add new build target which
builds with asyncify enabled.

Change-Id: Idaeff0a24aa01525927b012af2a0ba135c7839c3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-08-17 04:52:46 +02:00
Morten Sørvig
ad0cb1f32d wasm: add "skip" support to qtwasmtestlib
We're not looking to skip faulty tests, but there are cases
where we would like to indicate that a test function exists
but can't run because some precondition is not met.

Pick-to: 6.4
Change-Id: Ifaaafcfa7a55beaaf56d8b25fabbe3dc2566350f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
2022-08-17 04:52:46 +02:00
Morten Sørvig
f347682fd5 wasm: include asyncify support unconditionally
Emscripten's option for enabling asyncify (-sASYNCIFY) is a link-time
option, which means there is no requirement to have a separate asyncify
build, at least for static builds.

Replace the current QT_HAVE_EMSCRIPTEN_ASYNCIFY compile-time option
with a run-time option which checks if the asyncify API is available.

Keep support for configuring with "-device-option QT_EMSCRIPTEN_ASYNCIFY=1"
for backwards compatibility and for the use case where want asyncify
support to be on by default for a given Qt build.

Enable asyncify for the asyncify_exec example.

Pick-to: 6.4
Change-Id: I301fd7e2d3c0367532c886f4e34b23e1093646ad
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-08-17 04:52:46 +02:00
Alexandru Croitor
cf3535fdf2 CMake: Add manual test for various iOS asset handling
Includes:
- setting a custom Info.plist
- Bundling non-image assets
- Bundling image assets using asset catalogs
- Bundling app icons
- Bundling a launch screen

Projects added for both qmake and CMake.
The executable uses testlib to check that non-image assets,
icons and asset catalogs were successfully bundled upon deployment
to a device.

Task-number: QTBUG-104519
Change-Id: Iaab6112e31e1098dcd2548e18b58bed5b64e6f83
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-08-17 01:05:45 +02:00
Dimitrios Apostolou
753c352af0 Unblacklist tests that are no longer flaky
Couldn't reproduce flakiness on OpenSUSE KDE/X11 and can't see any
history of flakiness in the last 3 months in our testresults database.

Task-number: QTBUG-62967
Task-number: QTBUG-63262
Change-Id: Id50291798eda922283e04b45205ae9105e9fdab2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-08-17 01:05:45 +02:00
Dimitrios Apostolou
7524a36a26 Stabilize test by not activating window
Window activation is not working reliably on X11 when combined with
X11BypassWindowManagerHint, see QXcbWindow::requestActivateWindow().

The test itself counts repaints, so qWaitForWindowExposed() shouldn't be
needed.

This way we don't need to QSKIP() the test if window activation fails.

Fixes: QTBUG-98921
Change-Id: I849b7261c757fb7cbcde73f11bbe1a74a862cb9c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-08-17 01:05:45 +02:00
Dimitrios Apostolou
74f3bc263a Update BLACKLIST for tst_qgraphicsview
Removed entries that do not reproduce on OpenSUSE and that are no
longer flaky in our CI according to our testresults statistics database.

Adjusted entry for resizeAnchor testcase which has been seen flaky in
RHEL-8.4 and cursor2 which is very flaky on macOS.

Task-number: QTBUG-105249
Task-number: QTBUG-105247
Change-Id: I3e258f81d6bbf540a4b3dec763fdfd4bdc511847
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-08-17 01:05:45 +02:00
Dimitrios Apostolou
228ee98025 Unblacklist tests that are no longer flaky
Can't reproduce in OpenSUSE, and no flakiness has been seen in the past
6 months in our testresults statistics database.

Task-number: QTBUG-63260
Change-Id: I465aa4b9f82726e9685f64b0dc235d3235c4bd9c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-08-17 01:05:44 +02:00
Dimitrios Apostolou
dff9fa2ee1 Fix testcase that fails when run individually
Executing the tst_qgraphicsitem::sorting() testcase individually always
fails on my KDE/X11 desktop. The window never seems to have focus and
the call to qWaitForWindowActive() returns error after a few seconds.

It seems qApp->setActiveWindow(&view) never succeeds in giving focus to
the window containing the widget.

Fixes: QTBUG-105221
Task-number: QTBUG-74760
Change-Id: I148dab09d0fb592376b3902e4ed10799f9a52274
Done-with: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2022-08-17 01:05:44 +02:00
Thiago Macieira
e163c49435 qdbusxml2cpp: remove the old "In"-for-signal compatibility code
This led to an infinite recursion in case the annotation was completely
missing. Instead of trying to fix that, I'm simply implementing the
"### Qt6" request from c62f717226 .

[ChangeLog][qdbusxml2cpp] Removed the old compatibility code that
accepted "In" annotations for signal argument names, introduced in Qt
5.8.

Pick-to: 6.4
Fixes: QTBUG-104722
Change-Id: Ie4bb662dcb274440ab8bfffd1709bfc3daf0846d
Reviewed-by: David Faure <david.faure@kdab.com>
2022-08-16 16:05:25 -07:00
Mikolaj Boc
1007964f2d Maintain the window z-order properly in wasm compositor
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>
2022-08-16 16:08:38 +00:00
Laszlo Agocs
2de14b81a9 rhi: tst_qrhi: Check for OpenGL cap on the platform
Running tst_qrhi -platform eglfs will pass on RPi4 / Mesa 22.
This does not test Vulkan of course since the platform plugin cannot
create a Vulkan instance.

Running tst_qrhi -platform vkkhrdisplay will enable Vulkan but will
still try OpenGL since the autotest does not query the platform
integration about OpenGL support. Make this nicer by skipping most of
the GL test if the platform integration we have cannot handle OpenGL
stuff anyway.

For some tests the data-driven approach has to be removed since doing
QFETCH without any rows will crash. These two OpenGL-specific tests
now check OpenGL support directly and QSKIP if needed.

While we are at it, fix up the Vulkan instance API version as well.

Pick-to: 6.4
Change-Id: I2891c04540bc2dfd0ccf475629bd23542bff15f5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2022-08-16 16:00:15 +02:00
Edward Welbourne
0ed8987078 Update QTimeZone benchmark's list of tested zones
It purports to be a list of those named in QDateTime's tests, but was
a bit out of date. In the process, sort them into somewhat coherent
order (to make it easier to verify whether one is missing next time I
check) and reformat.

Pick-to: 6.4 6.3 6.2
Change-Id: I16e7ded6f8b00e226513bd06d6174a79f7a0c675
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-08-16 15:02:22 +02:00
Marc Mutz
b5d5385201 tst_qbytearray: remove qCompress_data for QT_NO_COMPRESS
The _data function is useless without its test function (and it's not
used in other _data functions).

Pick-to: 6.4 6.3 6.2 5.15
Change-Id: I7aa6006ed1a9d89008577b750af4ea717dae237f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-08-15 23:02:32 +02:00
Eskil Abrahamsen Blomfeldt
360f1547f7 Fix QFontDatabase::hasFamily() for ambiguous families
If a font family has several instances from different foundries,
we disambiguate this by adding the foundry name in brackets behind
the family. But QFontDatabase::hasFamily() would only check for
families().contains(familyName). So if the database contains e.g.
Foo [Bar] and Foo [Baz] then a check for hasFamily("Foo") would
fail.

So we need to actually check for the family name instead. In
doing this, we also skip the extra step of building the list
and then searching it, but just go directly to the source.

This removes the BLACKLISTing of Ubuntu and also introduces a
QSKIP on Unix-based platforms without fontconfig, since there
is no way to know which default fonts are acceptable on those
platforms.

Pick-to: 6.4
Fixes: QTBUG-86967
Change-Id: Id8ad80a1671daf1c14fbad8bb8f4c51ee1c59709
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-08-15 18:23:43 +02:00
Laszlo Agocs
5eacc974c7 rhi: d3d11: Enable tessellation and geometry with some caveats
The caveat being having to manually create HLSL versions of the hull,
domain, and geometry shaders in parallel with the Vulkan GLSL ones,
while keeping the interfaces intact (stage inputs and outputs, cbuffer
layouts, binding points/registers). This is not always trivial but
typically doable in not very complicated case after inspecting the
SPIRV-Cross-generated vertex/fragment code in the .qsb files. Once
written, the HLSL files can be injected into a .qsb file with qsb -r.
or the corresponding CMake syntax. Conceptually this is no different
from how samplerExternalOES support is implemented for Multimedia.
(there the problem is that the shaders cannot be compiled to SPIR-V
to begin with, here it is that we cannot translate from SPIR-V, but
in the end the workaround for both problems is effectively the same)

The manual tests demonstrate this, both the tessellation and geometry
apps work now with D3D out of the box.

On the bright side, the implementation here in the the D3D backend of
QRhi does not need to know about how the shaders got there in the
QShader. So none of the implementation is dependent on this manual
process. If some day qsb would start translating to these kind of
shaders as well, it would all still work as-is.

Change-Id: I32d9ab94e00174e4bd5b59ac814dfedef9f93ad1
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2022-08-15 10:51:17 +02:00
Edward Welbourne
45cbb1e31e Fix DeferredFlag implementation for QTestEventLoop
As discovered in the expanded testing of QTRY_COMPARE() using the same
class, the timer needs a context object and a slot to call.
This amends commit 35ad157d88

Pick-to: 6.4 6.3
Task-number: QTBUG-104441
Change-Id: I41fc23de84ce8c7d6608db0005276a2071974494
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2022-08-12 20:32:30 +02:00
Edward Welbourne
54bcefb25c Test QTRY_COMPARE() and expand testing of QTRY_VERIFY*()
In the process, simplify the latter while adding some actual
time-variation for the QTRY_* loop to navigate round - based on the
extendedcompare test's ClassWithDeferredSetter. Testing remains
primitive, but is at least a bit more thorough.

Pick-to: 6.4
Change-Id: I40be8fb485f3f18f0a4f4bc62ad36cccac691979
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2022-08-12 20:32:30 +02:00
Edward Welbourne
f5840692b0 Remove the stale expected_crashes_[345].txt
These contain output only ever sent to stderr, which tst_selftests no
longer looks at; it merely verifies stderr is empty for all tests
except those expected to produce stderr output, and ignores the stderr
output for these last.

Change-Id: I50fee445d84c2d125e6db5303fc389e87746455e
Reviewed-by: Jason McDonald <macadder1@gmail.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-08-12 20:32:30 +02:00
Thiago Macieira
6234182d82 QMetaType: don't use global relocations to the lambdas and structures
The way the Qt 6.0 QMetaTypeInterface was designed, using a static
inline variable in a template, would normally require the linker and
dynamic linker to merge all copies and choose a single copy as the
official one. But because of hidden visibility and of Windows DLLs,
QMetaType already copes with multiple copies NOT getting merged. So we
may as well ask the linkers not to bother and use simpler, local
relocations to find those symbols.

They are all supposed to still be equivalent and it's an ODR violation
if they're not.

The Apple ld64 linker complains if you use this type of global
relocation:

 ld: warning: direct access in function
  [...]
   to global weak symbol
   'QtPrivate::QMetaTypeInterfaceWrapper<int>::metaType'

Fixes: QTBUG-93471
Pick-to: 6.3 6.4
Change-Id: Id0fb9ab0089845ee8843fffd16f98a10aa719434
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-08-12 11:32:29 -07:00
Thiago Macieira
985e24dd5f QMetaType: add a test to confirm that types are equal across libraries
Because of the template shenanigans. This is just to make sure.

Pick-to: 6.4
Change-Id: Id0fb9ab0089845ee8843fffd16f989e7d555894f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-08-12 11:32:29 -07:00
Mikolaj Boc
f8e460b915 Use the local file APIs to save/load files on WASM
QFileDialog::saveFileContent, QFileDialog::getOpenFileContent are now
using local file APIs to access files on any browser that passes a
feature check.
The feature is thoroughly tested using sinon and a new mock library.

Task-number: QTBUG-99611
Change-Id: I3dd27a9d21eb143c71ea7db0563f70ac7db3a3ac
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-08-12 20:32:29 +02:00
Dimitrios Apostolou
d68da61564 Wait for window focus instead of expose event
This fixes the flakiness seen in OpenSUSE KDE/X11 desktop.

Fixes: QTBUG-70590
Task-number: QTBUG-105177
Change-Id: I7c2431e58b2a60ea04e26d4e70c0f2867d544ff2
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2022-08-11 19:09:09 +02:00
Dimitrios Apostolou
5b2b30a9c7 Try to stabilize window activation on macOS
Use activateWindow() that is documented as the right way to raise a window.

Task-number: COIN-892
Change-Id: Ic9aadee0d3a526fd8e46e5b1099b5b0861700207
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-08-10 21:44:40 +02:00
Dimitrios Apostolou
c1e8c99464 Test is stable on OpenSUSE, un-blacklist it
Task-number: QTBUG-74760
Change-Id: I78ca3779407d1076a11d0a948b61f4438d1ab4cc
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-08-10 21:44:40 +02:00
Dimitrios Apostolou
1aff079db5 Test is no longer flaky, unblacklist it
I can't reproduce the test failing after hundreds of iterations on
OpenSUSE, and the test hasn't flaked at all in our CI in the last 6
months according to our dashboards.

Fixes: QTBUG-70612
Change-Id: I2397f3db5caf97f674de7d75fd99bd14c14166a4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-08-10 21:44:39 +02:00
Dimitrios Apostolou
6ee0c79352 Test is not flaky any longer
I can't reproduce the issue after hundreds of iterations on OpenSUSE,
and the test hasn't flaked at all in the last 3 months according to our
dashboards.

Task-number: QTBUG-66371
Change-Id: I9c4daf851e09fbcb47a6ab39418e7b213ccd9dfe
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-08-10 21:44:39 +02:00
Sami Shalayel
cec3b3b4f9 Remove assertion from ownMethodIndex that breaks tests
ownMethodIndex works for all kind of methods, also for constructors.
Therefore, remove the assertion there (that checks for non constructors)
and add a test in qtbase so it does not happen again.

The test broken by the assertion is in qtdeclarative:
tst_QJSEngine::newQMetaObject().

Also rename QMetaMethodPrivate::ownConstructorIndex() to
ownConstructorMethodIndex() as the previous naming implied that
ownMethodIndex() could not be used for constructors.

amends b73ab954df

Task-number: QTBUG-105360
Change-Id: I0244993ed79bee055645b5443f5d02e1c089a6c6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-08-10 00:48:31 +02:00
Thiago Macieira
395c9ac731 Tests: remove #define COMMA
Those were workarounds to passing a comma to a macro, but there are ways
around it. The simplest is to just use variadic macros; another, which
has been applied to Q_DECLARE_METATYPE for a long time, is to define an
alias to the thing you're trying to use.

Change-Id: Ie4bb662dcb274440ab8bfffd17097fbf0c53eabc
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-08-09 12:13:26 -07:00
Joerg Bornemann
9ce5709fb1 CMake: Support big resources in qt_add_resources
[ChangeLog][CMake] The target-based variant of qt6_add_resource gained
the option BIG_RESOURCES. This can be used instead of
qt6_add_big_resources, which is not target-based.

Fixes: QTBUG-100268
Change-Id: Ib3fa783cbfbfd10f59c2f952bc88508a91f25e26
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-08-09 15:21:52 +02:00
Eskil Abrahamsen Blomfeldt
f49d35084c Wayland: Remove XFAIL after underlying bug was fixed
The intialSize bug has been fixed in Qt Wayland Client, and thus
this test will now start XPASSing.

Pick-to: 6.4
Task-number: QTBUG-66818
Change-Id: I4b9cb8bd9306a67f04295eb23f09574dad0e97f7
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2022-08-09 12:57:13 +02:00
Edward Welbourne
35ad157d88 Add some testing of QTestEventLoop
Fairly minimal for now, just enough to verify a bug and serve as the
sign of success when it's fixed. Tests fail in ways they shouldn't,
for now; see expected_eventloop.* for details, notably "Earlier test
failed to clean up" messages.

Pick-to: 6.4 6.3
Task-number: QTBUG-104441
Change-Id: I59be4aa5f21fed23b19a0593a8c2f6c9956507df
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2022-08-08 20:49:03 +02:00