Commit Graph

60033 Commits

Author SHA1 Message Date
Marc Mutz
ee1bd7decd Qt::Appearance: don't assign values to enumerators
The compiler does that for us. This makes the enum look like an enum
again. A non-flags enum shouldn't have intializers of the form 0xNNNN,
as that makes it looks like flags.

Found in API review.

Pick-to: 6.5
Change-Id: If49e94cdad719b7dc9e8a7b17f6883dc789e62d6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-02-08 08:37:21 +01:00
Yuhang Zhao
c3455ded49 Windows QPA: Rework how we activate the window
The new implementation has the following advantages compared to
the old one:

0. Qt's default activation behavior is not changed, this patch only
   improves how we forcely activate the window.
1. Account for the special case that the foreground window maybe hangs.
2. Truly bring the window to front if the window is hidden or minimized.
3. Use early return to save many indentation.

Change-Id: If51ad943fbc9771ebdddfa0e49732b12566ca2b6
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2023-02-08 13:09:03 +08:00
Giuseppe D'Angelo
13a8414696 Deprecate QTypeInfo::isPointer and isIntegral
They're completely superseded by standard traits, and there are no more
users in-tree. I'm not hiding them behind a QT_DEPRECATED_SINCE,
because these are private APIs, so there's no source compatibility
guarantees here. I'm also using [[deprecated]] directly to avoid
an extra inclusion after the QtGlobal split.

Change-Id: If649e52ffe51c5eba1c51da25b6fe0621a0b17b3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-08 01:37:07 +01:00
Thiago Macieira
b41c44d966 qdbusxml2cpp: don't emit Q_DECL_DEPRECATED for the adaptor
The adaptor is a server-side implementation that must exist anyway and
is called by the QtDBus runtime. We don't want warning on the server
side because it must call those methods to implement the client API.

Since we have the XML introspection saved in a class property anyway,
the runtime won't be inspecting the method tags to see if
Q_DECL_DEPRECATED is there, to add to the XML (which it isn't
generating).

Pick-to: 6.5
Change-Id: I9671dee8ceb64aa9b9cafffd17416596135d26ca
Reviewed-by: David Faure <david.faure@kdab.com>
2023-02-07 16:32:23 -08:00
Thiago Macieira
f67b32e735 qdbusxml2cpp: invert Q_DECL_DEPRECATED and inline in the output
Commit 93dad2bf91 (6.0) changed
Q_DECL_DEPRECATED to use the [[deprecated]] attribute, which must appear
before inline and other keywords.

To keep it next to Q_NOREPLY, I also moved the "inline" into the next
string.

Added missing tests for both.

Pick-to: 6.2 6.4 6.5
Fixes: QTBUG-110979
Change-Id: I9671dee8ceb64aa9b9cafffd1741656e86f40453
Reviewed-by: David Faure <david.faure@kdab.com>
2023-02-07 16:32:22 -08:00
Thiago Macieira
0128c3742e tst_qdbusxml2cpp: test the old-style QDBusReply interface output too
Pick-to: 6.2 6.4 6.5
Change-Id: I9671dee8ceb64aa9b9cafffd17416487c07f148a
Reviewed-by: David Faure <david.faure@kdab.com>
2023-02-07 16:32:21 -08:00
Tor Arne Vestbø
bac93ce5eb macOS: Skip deployment target runtime check when detecting compat version
When the main executable is built with a pre-macOS 11 SDK, the macOS
kernel and system libraries will enable a compatibility mode for
reporting the system version, reporting 10.16 instead of 11/12/13 etc.

This happens at at such a low level that even manually reading the
version from /System/Library/CoreServices/SystemVersion.plist is
intercepted.

Working around this by temporarily setting the SYSTEM_VERSION_COMPAT
environment variable is unfortunately not possible, as it's only read
on process creation/initialization.

The same goes for the kern.system_version_compat sysctl, as once it's
set it can not be changed back to its original value, and it's not
clear whether this sysctl should even be touched.

As long as we have no reliable way of reading the actual current
operating system version, we need to bail out of the deployment
target verification, to avoid false negatives where a plugin or
library, built with a deployment target of say 11.0, is loaded
into an application built with a pre-11.0 SDK, but running on
macOS 11+.

Pick-to: 6.5 6.4 6.2 5.15
Change-Id: I9c757a276726175c5dda694ffc1b88f1681d00fb
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-02-07 23:13:55 +00:00
Tor Arne Vestbø
a3697f2b84 permissions: Replace deprecated location permission usage key
And add the macOS specific key.

Pick-to: 6.5
Change-Id: I1e0446a1927ef530322388417b9300ae287752c3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
2023-02-08 00:13:55 +01:00
Fabian Kosmale
55ca636180 Fix proxy-data handling
This addresses two different issues:
- Firstly, we were casting the resolved binding data pointer to
  QPropertyProxyBindingData, instead of the d_ptr of
  QPropertyBindingData. Fix this by introducing a helper function,
  and consistently using it to access the proxy data.
- Secondly, we were not resetting the originalBindingData when the
  pointed to object was destoyed. Fix that, too.

Pick-to: 6.5 6.4 6.2
Task-number: QTBUG-110899
Change-Id: I7691c9df5cc26e761f6b0e5f16d152f7f2183208
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-02-07 22:27:37 +01:00
Christian Ehrlicher
efce30bb43 ODBC/SQL: Fix usage of SQLGetData
SQLGetData was called with a nullptr for the output buffer to determine
the buffer length which is not allowed. Fix it by passing a valid buffer
with a buffer size of 0.

Fixes: QTBUG-70362
Fixes: QTBUG-110803
Change-Id: I4d547383100714901a4e2ca3b4777326cfab12fe
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-07 22:27:37 +01:00
Christian Ehrlicher
a53fe60a92 SQL/ODBC: optimize QVarLengthArray usage
Optimize the QVarLengthArray usage by passing the prealloc size and
directly initializing the allocated memory instead using a memset
where needed.

Change-Id: I61c6f9387fae63ae0c62ee1e87d3b3a7430369b7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-07 22:27:37 +01:00
Christian Ehrlicher
6b58a40d32 SQL/ODBC: misc cleanup for fromSQLTCHAR()
Change fromSQLTCHAR() to honor the fact that we know the size of
SQLTCHAR during compile time.

Change-Id: I1cebf2550be7228980083703e143c7577e8ad377
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-07 22:27:37 +01:00
Albert Astals Cid
d619a952cd dbus: Register QDBusObjectPath
Fixes: QTBUG-108822
Pick-to: 6.2 6.4 6.5
Change-Id: Ib6d1a9cfc449df80cb7e5ad6211b07bdfd556093
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-07 21:15:18 +00:00
Amir Masoud Abdol
60c8a68746 Retrieve an old -redo behavior
It is not possible to manually edit the `config.opt` and do a redo, and
`configure/` uses the `config.opt` in this case.

Task-number: QTBUG-108287
Change-Id: I3d87b13a900b97fb50e49a4f155bec964ecb5d1a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-02-07 18:51:58 +00:00
Amir Masoud Abdol
04a3e411ec Rename Qt CMake policies argument names
We decided to go with REQUIRES/SUPPORTS_UP_TO.

Pick-to: 6.5
Task-number: QTBUG-96233
Change-Id: Ia82d22618d31c06b5260a632ba079eeba7a506e0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-02-07 19:05:12 +01:00
Ahmad Samir
27db859c6a Use QtMiscUtils hex/oct-related helpers
Thanks to Thiago for pointing them out in review.

Change-Id: I14d588a8bd5ba29d43a5daeacfd55d974eb65557
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-07 20:04:11 +02:00
Ahmad Samir
498f345228 QtMiscUtils: add some more character helpers
isHexDigit, isOctalDigit, isAsciiDigit, isAsciiLower, isAsciiUpper,
isAsciiLetterOrNumber.

This de-duplicates some code through out.

Rename two local lambdas that were called "isAsciiLetterOrNumber" to not
conflict with the method in QtMiscUtils.

Change-Id: I5b631f95b9f109136d19515f7e20b8e2fbca3d43
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-07 20:04:11 +02:00
Mate Barany
9a8b9473d5 Update CLDR to v42
New languages (and one local for each) added with v42
- Haryanvi
- Moksha
- Northern Frisian
- Obolo
- Pijin
- Rajasthani
- Toki Pona

It also appears that Canada has changed its date format. Modify the
relevant test case to reflect this change.

Task-number: QTBUG-110333
Pick-to: 6.5
Change-Id: Ia8975c2866cd54c9e565543d05bacd52f4987909
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-02-07 19:04:11 +01:00
Topi Reinio
275d510ce3 Doc: Update copyright year in the template
Pick-to: 6.2 6.4 6.5
Fixes: QTBUG-110271
Change-Id: I70ce5356941d2499a219ab9fb1875df23acda3dc
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2023-02-07 18:04:11 +00:00
Tor Arne Vestbø
364c462d80 macOS: Reduce verboseness of NSUserNotification deprecations
Task-number: QTBUG-110998
Pick-to: 6.5
Change-Id: I8fe252a9f6798e38f77c96b715f334427ffd062e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-02-07 19:04:10 +01:00
Pino Toscano
eeb66b99df Add/enable Alpha detection
- uncomment the Alpha detection defining Q_PROCESSOR_ALPHA, which is
  already used/documented in few places
- set the right machine type in QElfParser for Alpha ELF files

Pick-to: 6.5
Change-Id: I072bdee8b73ad3c86591c764aa7075c114967fd9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
2023-02-07 18:00:00 +00:00
Yuhang Zhao
07c234ae0b Windows QPA: make one function static
It doesn't use any non-static functions or variables, so it can be
static, and a function that sets a process's DPI awareness mode
doesn't need to be non-static anyway.

Change-Id: I4cc6e0f423b6cd4cf43d8afed86f26b5d04e3605
Reviewed-by: Timothée Keller <timothee.keller@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2023-02-08 01:59:59 +08:00
Yuhang Zhao
c53c292c1b Windows QPA: fix debug message
Before applying this patch, the debug message will contain new lines
which will look rather weired, this patch fixes that.

Amends commit 5e0d9a077d

Change-Id: I2420c04dd7e18a6556664a05ac4ef35c9b652f0c
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2023-02-08 01:59:59 +08:00
Yuhang Zhao
ad7227ada1 Use qt_winrtbase_p.h workaround in more places
This patch addresses the following issues:
(1) some places are still using the original workaround, replace
them with the new qt_winrtbase_p.h workaround.
(2) add more comment to let people know how to workaround other
cppwinrt issues (it was a common issue for many years and may be
fixed upstream recently, but let's at least document it in case
the user is still using old version cppwinrt).

Amends commit b2c1237b45

Pick-to: 6.5 6.4
Change-Id: Ife676f41739bbe69d9fb23bf5758be4b1fab4855
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2023-02-07 17:59:59 +00:00
Mikolaj Boc
d141d68949 Transfer the key handling logic to QWasmWindow
Also, use the embind approach as the rest of the events do, and
introduce a KeyEvent class which simplifies and streamlines event
support.

The event translator has been given a more specific function of
just handling the dead keys. Rest of the translation functionality
is coded directly in KeyEvent for more encapsulation.

Change-Id: I11b0262fc42fe920206ecc6de0d434b9d9ab9998
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-02-07 18:59:59 +01:00
Giuseppe D'Angelo
62be4ab5be XCB: simplify atom registration code
There's no need of calculating offsets into the \0-separated string
of atom names; since we're going to iterate that string exactly once,
do that, and register the corresponding atom name as we iterate.

(This means that solutions that calculate the offsets at compile-time,
like qOffsetStringArray, are also overkill for the use case).

Change-Id: I71ed512dee4f2a8bfb99ca2392efbd8a07f2a7c1
Reviewed-by: JiDe Zhang <zhangjide@uniontech.com>
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-02-07 18:59:59 +01:00
Giuseppe D'Angelo
3d72e8829f XCB: do not use reserved identifiers
Any identifier starting with underscore followed by a capital letter is
reserved for the implementation in C++, so don't use them. Rename the
entries in the Atom enumeration by adding an "Atom" prefix to them.

Pick-to: 6.2 6.4 6.5
Change-Id: I059e2093149f39cc9324cd1159c0d9e076eda93a
Reviewed-by: JiDe Zhang <zhangjide@uniontech.com>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2023-02-07 18:59:58 +01:00
Amir Masoud Abdol
34519d44ff QtGui: Fix some macro clashes
Macro Q_FIXED_POINT_SCALE in qpathssimplifier.cpp clashes with
the macro with similar name in qtriangulator

Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: I02732ae62238e8b7fae0630764fdd33b6203afe3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-02-07 18:59:57 +01:00
Fabian Kosmale
115a38613c QMetaObject: Fix version check for deprecated methods
We don't want them in Qt 7.0.0, either.
As a drive-by, also guard the implementation with the same check.

Pick-to: 6.5
Change-Id: I21b181e5563ebc2b247d6c5ad005bb76224f0daf
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-07 18:36:11 +01:00
David Schulz
834e97ce46 Add android manifest and java files to example
These files should not change the outcome of the build process, but are
merely added to better support the CMake and Android integration in
Qt Creator. Also those files were previously listed in the OTHER_FILES
section of the qmake project files.

Change-Id: Id3d403130ee8800ed6b0877f9f1c3dd1f28b46b7
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-02-07 18:34:42 +01:00
Jan Arve Sæther
f7db1cfa92 Remove "Analog Clock Window Example"
This is almost exactly the same as the "Analog Clock" (widget) example.
"Analog Clock Window Example" demonstrates:
* How to render to a QWindow (covered by RasterWindow example)
* QPainter and transformations (covered by Analog Clock example)
* How to use QTimer (covered by Analog Clock example)

Pick-to: 6.5
Change-Id: I7f20a29798830ed6345eca250e4139cb314cab84
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2023-02-07 17:34:42 +00:00
Alexandru Croitor
4a4c329687 CMake: Show a message when configuring examples
This somewhat indicates the progress of configuring a specific
repo and the slower period of time when configuring examples
in-tree.

Pick-to: 6.5
Change-Id: I643536c4ebc865933730b7af2a1d0c56bbbf2912
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-02-07 18:27:11 +01:00
Matthias Rauter
285c326ef4 Use plain text to calculate expire time of tooltips
Fixes: QTBUG-110735
Pick-to: 6.5
Change-Id: I3f0db04f3be9707167f7c19507ebbb5a9c4466d2
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-02-07 18:23:03 +01:00
Alexey Edelev
9f36ab1f8d Move the accessibility header files under the appropriate feature
Use the CONDITION_INDEPENDENT_SOURCE argument to add the
accessible/qaccessible.h and accessible/qplatformaccessibility.h
header files as part of the QT_FEATURE_accessibility feature.

This will warn feature maintainers about the need of proper
guarding in places where headers are used.

Amends 11a9af6484

Change-Id: I9d3c3526572da205e316747f809a5ff93717897f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-02-07 18:14:44 +01:00
Ville Voutilainen
1ebf8c529d androiddeployqt: make --help documentation-friendly
Change-Id: I08558d23230ec162928fea2c413ae8e2498617d7
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2023-02-07 18:53:44 +02:00
Amir Masoud Abdol
edc62595f2 QtGui: Remove double default definition
In all the cases below, the parameters are defined in the
qtestsupport_gui.h as well.

Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: I3311d6c23b3a811dbe20286bd4534ca1ed7cd7f3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-02-07 17:26:02 +01:00
Tor Arne Vestbø
14649404bc permissions: Handle relative paths to Info.plist file
Pick-to: 6.5
Change-Id: I5fb6bd7da37392bb4a44309b4545fe158a60b3e3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-02-07 13:33:03 +01:00
Mikolaj Boc
5af0177c9e Add a platform theme option to affect SH_UnderlineShortcut
The style hint SH_UnderlineShortcut can now be turned on/off via the
platform theme.

No change in functionality so far on any platform, this behaves the
same way it did before the change. The change just adds a possibility
for platforms to redefine the default underlining behavior.

Task-number: QTBUG-76587
Change-Id: Ibda104f1b733371da19825b96e73c22f42faf853
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-02-07 13:33:02 +01:00
Tor Arne Vestbø
8dc3ee03a4 iOS: Disallow upgrading QLocationPermission::WhenInUse to Always
This is technically possible on iOS, but the system doesn't give us
a callback unless the user accepts the upgraded permission level,
and we need a deterministic callback in both cases so that we can
report the result back to the permission request callback.

  https://tinyurl.com/requestalwaysauthorization

Pick-to: 6.5
Change-Id: Id006dbbb2f6fad4b831742e4d3e904525aaa8a2a
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-02-07 13:33:02 +01:00
Tor Arne Vestbø
e2030e366b iOS: Report PermissionStatus::Denied when detecting accuracy mismatch
There's no way to upgrade an Approximate accuracy permission to Precise,
so once we have a known status we report the lacking accuracy as Denied.

Pick-to: 6.5
Change-Id: Id49af825335ff09669aa7f2285caaa744a5a4d24
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-02-07 13:33:02 +01:00
Tor Arne Vestbø
0c2ee11f41 permissions: Set explicit bundle identifier for permissions example
It's needed for location permissions to work.

Pick-to: 6.5
Change-Id: Iffb5d92f863ab79434b4071d5896b349010f87fb
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-02-07 13:33:02 +01:00
Amir Masoud Abdol
86295c8d89 Make qt6_extract_metatypes respects the AUTOGEN_BUILD_DIR, if set
If AUTOGEN_BUILD_DIR is set, _qt_internal_get_target_autogen_build_dir
returns that; otherwise, the default builddir/${target}_autogen will be
returned.

Pick-to: 6.5
Task-number: QTBUG-110696
Change-Id: I028058bd0176c25bc4bc66be8abcae4f7e43a0f2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-02-07 13:33:02 +01:00
Santhosh Kumar
4e4d37f047 Avoid multiple transformation of the clip path
The painter saves existing paint engine state in the stack and restore
back to the previous state after performing required paint operation.

The clip path stored as part of paint engine state is getting
translated more than once during save and restore operation. This
multiple transformation of the same clip path causes incorrect
translation within the plane.

To fix this issue, during restore, remove translation of clip path
with redirection matrix.

Fixes: QTBUG-109518
Pick-to: 6.5 6.4 6.2
Change-Id: I1509bc7fa4965f2802bce62c1ed27cdb90da617a
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2023-02-07 13:33:02 +01:00
David Faure
94057bd800 QDir::entryList: don't fill a QFileInfo cache if we just want names
This improves the performance of tst_QDir_10000::iDontWantAnyStat
(QDir::entryList Unsorted)
from 9.7ms to 7.2ms, i.e. the same as iDontWantAnyStatIterator
(QDirIterator).

Change-Id: I3faf8af1a55575df97912b1ce720492c8fd903c9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-07 13:33:01 +01:00
David Faure
eae031d5c3 Fix QDir benchmark to do meaningful things
* Include the creation of the QDir inside QBENCHMARK, otherwise
  the it can hit the cached code path where subsequent runs return
  results much faster.

* Same for the opendir()/readdir() test: if opendir() isn't called
  again, readdir() will just return null right away.

These two issues led to nonsense results like 0.00025 msecs per
iteration, doing nothing is really quick.

While at it, port the cleanup code to QDir::removeRecursively()

Pick-to: 6.5 6.4 6.2
Change-Id: Ic1bdd92d41efe1f6d0eaaa33eca066cb7d19fc93
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-07 13:33:01 +01:00
Laszlo Agocs
84fb0de413 rhi: Add D3D12 support
- The optional nice-to-haves DebugMarkers, Timestamps, PipelineCache
  are not yet implemented (features reported as false, to be
  implemented later, although buffer/texture resource name setting
  already works as-is, regardless of DebugMarkers).

- Mipmap generation for 3D textures is missing. Won't matter much
  given that 3D textures are not used in Qt for anything atm. For
  generating mipmaps for 2D (or 2D array) textures, the MiniEngine
  compute shader and approach is used. 3D support for the mipmap
  generator may be added later. 1D textures / arrays are supported
  except for mipmap generation, and so the
  OneDimensionalTextureMipmaps feature is reported as false.

- Qt Quick and Qt Quick 3D are expected to be fully functional.
  (unforeseen issues are not impossible, of course)

- Uses minimum feature level 11.0 when requesting the device. It is
  expected to be functional on resource binding tier 1 hardware even,
  although this has not been verified in practice.

- 2 frames in flight with the usual resource buffering
  (QRhiBuffer::Dynamic is host visible (UPLOAD) and always mapped and
  slotted, other buffers and textures are device local (DEFAULT).
  Requests 3 swapchain buffers. Swapchains are mostly like with D3D11
  (e.g. FLIP_DISCARD and SCALING_NONE).

- The root signature generation is somewhat limited by the SPIR-V
  binding model and that we need to map every binding point using the
  nativeResourceBindingMap from the QShader. Thus the root signature
  is laid out so each stage has its own set of resources, with shader
  register clashes being prevented by setting the visibility to a
  given stage.

  Sampler handling is somewhat suboptimal but we are tied by the
  binding model and existing API design. It is in a fairly special
  situation due to the 2048 limit on a shader visible sampler heap, as
  opposed to 1000000 for SRVs and UAVS, so the approach we use for
  textures (just stage the CPU SRVs on the (per-frame slot) shader
  visible heap as they are encountered, effectively treating the heap
  as a ring buffer) would quickly lead to having to switch heaps many
  times with scenes with many draw calls and sampledTexture/sampler
  bindings in the srb.

  Whereas static samplers, which would be beautiful, are impossible to
  utilize safely since we do not have that concept (i.e. samplers
  specified upfront, tied to the graphics/compute pipeline) in the
  QRhi API, and an srb used at pipeline creation may change its
  associated resources, such as the QRhiSampler reference, by the time
  the shader resources are set for the draw call (or another,
  compatible srb may get used altogether), so specifying the samplers
  at root signature creation time is impossible.

  Rather, the current approach is to treat each sampler as a separate
  root parameter (per stage) having a descriptor table with a single
  entry. The shader visible sampler heap has exactly one instance of
  each unique sampler encountered during the lifetime of the QRhi.

- Shader-wise no different from D3D11, works with HLSL/DXBC 5.0
  (i.e. existing .qsb files with DXBC in them work as-is). But unlike
  D3D11, this one will try to pick 6.7, 6.6, ..., down to 5.0 from the
  QShader, in that order.

- Uses D3D12MA for suballocating. As a result it can report vmem
  allocation statistics like the Vulkan backend, and it does more
  since the DXGI memory usage (incl. implicit resources) is also
  reported.  This is optional technically, so we also have the option
  of going straight with the heavyweight CreateCommittedResource()
  instead.  That is what we do if the adapter chosen reports it's
  software-based or when QT_D3D_NO_SUBALLOC=1 is set.

- PreferSoftwareRenderer (picking the WARP device) and the env.var.
  QT_D3D_ADAPTER_INDEX work as with the D3D11 backend.

- It is not unexpected that with large scenes that generate lots of
  draw calls with multiple textures/samplers per call the performance
  may be slightly below D3D11 (probably mostly due to descriptor
  management). Similarly, the reported memory usage will be higher,
  which is partly natural due to creating heaps, descriptor pools,
  staging areas, etc. upfront. Will need to be evaluated later how
  these can be tuned.

Change-Id: I5a42580bb65f391ebceaf81adc6ae673cceacb74
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-02-07 13:33:01 +01:00
Joerg Bornemann
19c32e7ee7 CMake: Warn about double qt6_finalize_target for plugins and libs
qt6_finalize_target warned about double invocations on executables
already. For libraries and plugins this situation wasn't detected.

Make the warning consistent for qt6_add_executable, qt6_add_library and
qt6_add_plugin. The internal property _qt_executable_is_finalized has
been renamed to _qt_is_finalized and applies to all targets that can be
finalized.

Pick-to: 6.5
Change-Id: I06821d08042e1453f3e058ed90a13e90a4f06640
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-02-07 13:33:01 +01:00
Joerg Bornemann
3c66def23f windeployqt: Remove hard-coded information about modules and plugins
Windeployqt now reads modules/*.json and translations/catalogs.json to
determine the available Qt modules, Qt plugins and their corresponding
translation catalogs.

This patch removes the hard-coded information that was used before. Now,
we don't have to update windeployqt anymore to teach it a new Qt module.

Pick-to: 6.5
Fixes: QTBUG-109841
Task-number: QTBUG-106342
Change-Id: Ib7b7f44ca7d40d0c73d717d8494367af412ebdbe
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-02-07 13:33:01 +01:00
Mikolaj Boc
40ddc38a7b Support WindowTitleHint and FramelessWindowHint in QWasmWindow
WindowTitleHint now correctly enables/disables the window title, and
FramelessWindowHint correctly enables/disables the window frame.

Change-Id: I6f98f0a53af828606748308c6b5bd5d492cef9d2
Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-02-07 13:33:01 +01:00
Mate Barany
916008a50d Include QLocale::system() in matchingLocales() return list
QLocale::matchingLocales() only returns matches from the CLDR database,
it does not include the current system locale as a match, even if it
does match. Add the current system locale, if it matches.

Task-number: QTBUG-106644
Change-Id: If2e409bf0fd8582941646838330e36b79952d3f6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-02-06 12:22:11 +01:00