Commit Graph

57728 Commits

Author SHA1 Message Date
Michael Weghorn
ee35afc117 a11y atspi: Drop 'if (0)' branch
Change-Id: Ie175405298ed03752b48a8b74d23bd5f1b0b148e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-08-17 17:02:26 +02:00
Mårten Nordheim
c684b8e939 QAuthenticator: Fix crash when using NTLM / Negotiate
With NTLM/Negotiate we delete the context used to generate replies once
we get SEC_E_OK. Due to some faulty logic in the http backend we could
end up trying to generate another response. Qt would then pass
references to some offsets of nullptr into the API calls causing it to
crash. Add some sanity checks before the "sspi continue" calls to make
sure this won't happen, and update the condition in the http
backend to check that we have not already sent our credentials.

As a drive-by: correct the initialization of the handles to use
SecInvalidateHandle instead of memset to 0.

Pick-to: 6.4 6.3 6.2 5.15
Fixes: QTBUG-102359
Change-Id: I884ff8fc70609fe8746b99a1d56eeafcda9d2620
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-08-17 15:14:52 +02:00
JiDe Zhang
90ad4d10ef xcb: Propagate a few theme hint changes to QGuiApplication
When the xsettings value of relevant style hints is changed
we propagate it to QGuiApplication via handleThemeChange.

Change-Id: I316c90e776f52e92c1249aa4e1fcb3ced331f8f5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-08-17 21:14:52 +08:00
Michael Weghorn
7594e8ca4d a11y atspi: Send D-Bus reply for "GetCaption" in expected format
Just like for the "GetSummary" case, the argument in the
reply for this AT-SPI table method needs to
be wrapped in a variant.

Fixes this warning from the output of the client side
using libatspi:

> (accerciser:181933): dbind-WARNING **: 11:50:36.394: atspi_dbus_get_property:
> expected a variant when fetching Caption from interface org.a11y.atspi.Table; got (so)

Fixes: QTBUG-105520
Pick-to: 6.4 6.3 6.2
Change-Id: I18167359e4cd3bb14a94289ac7481f9e39a18ad0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-08-17 10:49:36 +02:00
Michael Weghorn
a32a3aa388 a11y atspi: Add support for ATSPI_COORD_TYPE_PARENT
So far, only screen coordinates (`ATSPI_COORD_TYPE_SCREEN`)
and coordinates relative to the widget's top-level window
(`ATSPI_COORD_TYPE_WINDOW`) were supported.

In at-spi 2.30, a third coordinate type, describing
coordinates relative to the widget's immediate parent,
was added: `ATSPI_COORD_TYPE_PARENT` (commit: [1])

This commit adds the handling to convert to and
from that coord type as well and unifies the
existing handling to convert to/from screen coordinates
by introducing two static helper methods
(`AtSpiAdaptor::translateToScreenCoordinates` and
`AtSpiAdaptor::translateFromScreenCoordinates`) and
making use of those wherever conversion needs to
be done.

In addition, also add a check to only handle
requests using a coordinate type that is one of those
that is actually supported instead of returning
incorrect values (for the case that new coord types
should be introduced in AT-SPI in the future).

[1] 737c9853b6

Fixes: QTBUG-105313
Change-Id: Ia8752bd6a35328cc2de33ecad08f2964735f41ae
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-08-17 10:48:59 +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
83cf2985e9 wasm: streamline the exec warning
State the problem and suggest possible solutions for the
app developer.

Pick-to: 6.4
Change-Id: I0484c4eb31020ec0016005f43f910f32a319b850
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@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
Morten Sørvig
238e90cd58 wasm: remove dead qt_asyncify_yield() code
The call to this function was behind a broken #define and
was never enabled. It also does not work, so remove it.

This means that calling processEvents() in a loop (as opposed
to calling exec()) most likely does not work either, which
is something we want to revisit.

Pick-to: 6.4
Change-Id: I90802a69d3a48e7f2b5d0b657d89452c09d9571a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-08-17 04:52:46 +02:00
Michael Weghorn
fa0e24b641 a11y atspi: translate coords for GetOffsetAtPoint the right way
The coordinate type for "GetOffsetAtPoint" describes the
coordinate type of the input coordinates and
`QAccessibleTextInterface::offsetAtPoint` expects the
coordinates in screen coordinates.

Therefore, if window-relative coordinates are given,
the screen coordinates of the window need to be added
(not subtracted) to the window-relative coordinates of the point
in order to calculate the screen coordinates of the point.

Fixes: QTBUG-105281
Pick-to: 6.4 6.3 6.2
Change-Id: I5517335c0c0d6a47b8c45c7e4f8f8b5a91f0fcd7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-08-17 04:46:59 +02:00
Michael Weghorn
49c966bc85 a11y atspi: Take dialog into account as top-level window
Since a dialog is also a top-level window, it should be taken
into account when trying to find the accessible's top-level
window, relative to which the position will be calulated for
`ATSPI_COORD_TYPE_WINDOW`.

Fixes: QTBUG-105042
Pick-to: 6.4 6.3 6.2
Change-Id: I74fae096fd886bab04187c122f268c26c91b86ab
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-08-17 02:46:59 +00:00
Michael Weghorn
d40dacf5f4 a11y atspi: Fix incorrect use of x instead of y position
Fixes: QTBUG-105031
Pick-to: 6.4 6.3 6.2
Change-Id: I26fcbfbd5a90982b87dda89b2880efe937f099d8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-08-17 04:46:59 +02:00
Jaroslaw Kubik
e16f742479 Provide a native interface instance in minimal platform plugin
The minimal platform plugin does not have any native APIs it could offer
through that interface, but needs to provide an instance anyway. A lot
of code within Qt assumes that a native interface is always available
and does not check the pointer value, which leads to segfaults when used
with the minimal plugin.

Pick-to: 6.4 6.3 6.2 5.15
Change-Id: I625bd95afd49872cff3a34b29ceb0ffbbcd39db7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-08-17 04:46:59 +02:00
Alexandru Croitor
64b84977eb qmake: Fix tool paths generated for androiddeployqt json file
They should contain the executable suffix .exe when
androiddeployqt is run on Windows, because androiddeployqt does not
add the suffix itself when the tool paths read from the json file.

Amends 4fc14b1933
Amends 176136ce60

Pick-to: 6.4
Fixes: QTBUG-105133
Fixes: QTCREATORBUG-27868
Change-Id: I8c5bac2fa6c82d122f8a70c5ff2a561298327a34
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-08-17 04:38:43 +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
1022922037 QSemaphore: Fix warnings about shift exceeding size on 32-bit
error: right shift count >= width of type [-Werror=shift-count-overflow]

Pick-to: 6.4
Fixes: QTBUG-105687
Change-Id: Ic6547f8247454b47baa8fffd170bd9cd0e2a8ca3
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-08-16 16:05:25 -07: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
Thiago Macieira
478b1afbe1 qdbusxml2cpp: be consistent in the annotation suggestion
Some lines were suggesting the method name as context, while most of the
others were the parameter or property name.

Pick-to: 6.4
Change-Id: Ie4bb662dcb274440ab8bfffd1709c0a71abc27dc
Reviewed-by: David Faure <david.faure@kdab.com>
2022-08-16 16:05:25 -07:00
Tor Arne Vestbø
ed631011fa Rename QPlatformFontDatabase::handleAvailableFontsChanged()
The function name was easy to mistake for a function you should call
after adding fonts via e.g. registerFont or registerFontFamily, but
in reality it's meant to be used when the platform font database
knows that fonts have changed in a way that needs a full populate.

Pick-to: 6.4
Change-Id: I4a897944aaa5df891562f729440b5d98b54f61e0
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-08-16 17:12:44 +00: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
878328c6ab rhi: Enhance internal docs about buffer and image load/store
Comparing the backends revealed that one cannot expect that
exposing a storage buffer or a texture to a shader with
bufferLoad, imageLoad, bufferStore, imageStore, etc. will
always be functional in any graphics and compute pipeline
stage. In fact the only place where this is universally
supported are compute shaders.

In other shaders some backends will not expose the resources
at all, e.g. because in D3D11 unordered access views (for a
buffer or image used with load/store) have limitations on the
API level, whereas others may have runtime limits, e.g. with
OpenGL ES an implementation may just say
GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS is 0 meaning no SSBOs in
vertex shaders. (apparently the case on some embedded GPUs,
presumably due to the tiled architecture, e.g. on Mali)

So for now add a note to all the relevant
QRhiShaderResourceBinding functions.

It should be possible to make it work with fragment shaders
to a degree at least, but for D3D we then have to deal with
OMSetRenderTargetsAndUnorderedAccessViews and some remapping
of binding points, whereas elsewhere they may be issues with
missing or incorrect barriers. So do not go there now.

Change-Id: Ib18949e0184626a9abf5bb72c6ef72bc1cb2e1fa
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2022-08-16 18:08:38 +02:00
Richard Moe Gustavsen
b90fd5f707 doc: QEventPoint::timeHeld is reported in seconds, not milliseconds
Pick-to: 6.4 6.3 6.2
Change-Id: I71b6fdffe7f7177069c8fe3989e8547102a7e3a6
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-08-16 16:00:15 +02:00
Laszlo Agocs
e025b07c64 vkkhrdisplay: Create the platform window always
No matter what the surface type was. We only support VulkanSurface, so
if the type is something else, then a a qWarning is in order, but instead
of returning nullptr (which will almost certainly cause a fail or crash
in some form), we can just carry on normally. The resulting window
will not be renderable from the application of course, but that is
not always needed in fact, plus failing gracefully is nicer.

The tst_qrhi autotest can now be run on the RPi4 also with
-platform vkkhrdisplay. While there are some odd messages occurring
from Mesa and co., the run now completes normally, with no failures.

Change-Id: I77bd249096aede8e05458559458581d702054540
Pick-to: 6.4
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2022-08-16 16:00:15 +02: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
Laszlo Agocs
73fe9a786c rhi: Fix instance API version when only 1.1 is supported
Looks like something inherited from the Qt Quick code that got
moved into the helper. Setting a request of API version 1.2 is
harmless in practice, but to be correct the version should be
1.1 when 1.2 and newer are not reported by the instance.

Change-Id: I62d2c143972d6753e4311c6907ccf846ae0e9088
Pick-to: 6.4
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2022-08-16 16:00:15 +02:00
Alexandru Croitor
e38956e4f7 qmake: Fix non-Xcode asset catalog handling for iOS simulator
If an iOS project was built with qmake using the Makefile generator
instead of the Xcode generator,
so -spec macx-ios-clang, and not -spec macx-xcode,

Asset catalog processing failed with an actool error like
 Unknown platform: "ios-simulator"

This is because we used the deployment identifier (which is meant for
creation of the -mios-simulator-version-min flag) to pass a value
to actool's -platform option, rather than the sdk name.

Introduce a new variable called platform_identifier, which will be set
to the currently processed macOS/iOS sdk name (e.g. macosx,
iphonesimulator, iphoneos).

Use it when processing asset catalogs using the Makefile generator.

Relates to 9daeb6fe9d
Amends 5574aa986b

Pick-to: 6.3 6.4
Fixes: QTBUG-102053
Change-Id: Ic4ea3b9e11c21ae535d6544cbed3670f9db44e72
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-08-16 15:02:22 +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
Tor Arne Vestbø
836c7f2b30 Windows: Align QWindowsWindow logging category name with other platforms
Other platforms name it singular 'qt.qpa.window'.

Change-Id: I668ed67e1686605fe5f77313c7a01c31fd574c32
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2022-08-16 09:35:15 +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
Marc Mutz
401041f958 QDeviceDiscoveryUDev: use NSDMI
This also fixes 0-used-as-nullptr warnings from clang-tidy.

Pick-to: 6.4 6.3 6.2 5.15
Change-Id: Ibf10f1719a6c8cf22046cf30298dadb307a853d5
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-08-15 21:02:32 +00:00
Tor Arne Vestbø
7fc4bcd0f3 macOS: Ignore deprecation for ReleaseIconRef
There's no good replacement yet for our use of GetIconRef
and ReleaseIconRef, so for now ignore the deprecation.

Pick-to: 6.2 6.3 6.4 5.15
Change-Id: Iffcaa2af3c9e2ee053303a2272e8874913dd74d4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-08-15 21:08:45 +02:00
Sze Howe Koh
709ca8212e Fix ignored name filter in QFileDialog::getOpenFileContent()
Fixes: QTBUG-104948
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: I83a565bfe604472fcdeb8757464e0e350da5d766
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2022-08-16 03:08:45 +08:00
Mikolaj Boc
644ae42e12 Make wasm finalizers work for standalone tests and other repos
The wasm helpers file is not included in QtBuild and is thus not visible
when standalone tests or other repos are being built. This fixes it.

Amends 1f9c1f032c

Pick-to: 6.4
Fixes: QTBUG-105615
Change-Id: I6c9229e1f259fa5043d7d11b8ee0293e26077f3e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-08-15 16:46:12 +00: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
Kai Köhne
47fded488e Doc: Remove mentioning of outdated QDataStream version
The exact version doesn't add much information, and will most likely
go stale again; so just remove the mentioning.

Change-Id: Ifd87f7cf655a610aa45e341cf5a3491ae7d91171
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-08-15 18:23:43 +02:00
Laszlo Agocs
dea9ed7e4c vkkhrdisplay: Silence validation complaints about presentation support
Zero reason to do this query, but the validation layer complains otherwise.

Pick-to: 6.4 6.3 6.2
Fixes: QTBUG-105527
Change-Id: I7a72e4d6d89f41279db94efe663a696302f05ded
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2022-08-15 18:17:50 +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
Alexandru Croitor
6c9f4f5ebc CMake: Enable public executable finalizers for iOS tests
This ensures that tests can be executed on the simulator or device, by
doing the necessary steps like setting a bundle identifier, Info.plist
file, launch screen, etc.

This is done by calling _qt_internal_finalize_executable in the
implementation of all internal test adding functions.

The finalizers are limited only to iOS for now, as an incremental
step, and to ensure we don't accidentally break tests on other
platforms.

At least WebAssembly uses its own finalizers which would likely cause
duplicate calls if the _qt_internal_finalize_executable was
unconditional.

Pick-to: 6.4
Fixes: QTBUG-104754
Change-Id: I729d56385dd206b22c975fc2ce4e2c683e6e4e2c
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-08-15 10:44:54 +02:00
Alexandru Croitor
c76bf58350 CMake: Tests on iOS must be app bundles to be runnable
Pick-to: 6.4
Task-number: QTBUG-104754
Change-Id: I05053d0f242f45e56e7a95ac75f5ef63ca8a5e0e
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-08-15 10:44:51 +02:00
Alexandru Croitor
3608bb543d CMake: Use the Xcode generator for qt-cmake-standalone-test on iOS
Pick-to: 6.4
Task-number: QTBUG-104754
Change-Id: I43aae05f7e101a619d2c1b97d9a96c74d8498bfa
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-08-15 10:44:47 +02:00
Elias Hautala
1a60194388 Sliders: Add function that changes widgets position on layout
Changes the layout to QGridLayout and adds function to change widgets
position on the layout depending on the windows aspect ratio. Before
this the widgets wouldn't fit on screen when using the example on
Android in portrait.

Fixes: QTCREATORBUG-27685
Pick-to: 6.2 6.3 6.4
Change-Id: I00009cb6c8c250a8333ac3dfa635f70da4576d5e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Jani Korteniemi <jani.korteniemi@qt.io>
2022-08-15 11:22:14 +03:00
Kai Köhne
b057659255 Mark C++11/C++14 portability macros as deprecated
Pick-to: 6.4
Fixes: QTBUG-105542
Change-Id: If99a47858c5b48a726ad323fba6bf871bfda37d0
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-08-14 10:56:26 +00:00
Sona Kurazyan
9674f1cc88 Move macros for Darwin-based operating systems to qsystemdetection.h
Task-number: QTBUG-99313
Change-Id: I5198baa1369e296cd06db964a6286978bb874859
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-08-13 02:20:40 +02:00
Sona Kurazyan
217a5f0745 Move the checks for disabling useless warnings to qcompilerdetection.h
Task-number: QTBUG-99313
Change-Id: I7b4a62e7a8f8a07a9386a6f1f41a33c3fc802daf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-08-13 00:20:40 +00:00