Commit Graph

59988 Commits

Author SHA1 Message Date
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
Friedemann Kleint
94c16517b3 uic: Generate string-based connections for QLCDNumber::display()
There are still ambiguous overloads of display(), which cause PMF-syntax
to fail.

Pick-to: 6.5 6.4
Task-number: QTBUG-110952
Change-Id: I0887a5a06b026e4d5a20ef732d5892c8ac7fb6db
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-02-06 12:20:50 +01:00
Topi Reinio
c4b32597e7 Doc: Fix documentation warnings for Qt Core
These linking issues were not caught by documentation testing in the CI.

 * android-content-uri-limitations.qdocinc: Fix external link title
 * Fix links to 'Native IPC Keys'
 * Fix \sa links to 'Inter-Process Communication'
 * Replace \sa links to non-existent function nativeKeyType()
 * Drop explicit link to undocumented class QBasicAtomicInteger

Change-Id: I041a8cd2301cc2e77b88c085e74e9178e507a7a1
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2023-02-06 11:20:20 +00:00
Marc Mutz
e8322a4cc0 Use std::exchange in Qt::endPropertyUpdateGroup()
Easier to read, saying in one line that for which the old code needed
three.

Task-number: QTBUG-110710
Change-Id: Ie2a1d11aefe0bdf5f4db0694832fce669de564fc
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-02-05 23:42:47 +01:00
Marc Mutz
d257a56c93 Fix narrowing in Qt::endPropertyUpdateGroup()
decltype(QPropertyDelayedNotifications::used) is qsizetype, not int,
so don't use int to count from 0...used.  The notify() and
evaluateBinding() functions use their int argument only for pointer
arithmetic, so this is completely self-contained.

Amends fdedcb6ec6.

Pick-to: 6.5 6.4 6.2
Task-number: QTBUG-103532
Task-number: QTBUG-110710
Change-Id: I765a06628d330fbb57a2fbecc96d66690bb62f13
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-02-05 23:42:40 +01:00
Mikolaj Boc
f9bf0be854 Support Qt::WindowCloseButtonHint in QWasmWindow
Change-Id: I1cd74e5c9e73c2585d3da3fa0ee4aafd24130019
Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-02-05 22:32:36 +01:00
Ville Voutilainen
9286d46ee2 Skip socket and server tests on Ubuntu 22.04 and QEMU
Task-number: QTBUG-107696
Change-Id: Ic9cecd0c8624e7e8211633ef8a8ce0339662b4f6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-05 18:50:30 +00:00
Mikolaj Boc
ae51eeb0bb Support Qt::WindowMaximizeButtonHint in QWasmWindow
Change-Id: I1089ab4706c4342fa5976b1aff18d67d47769687
Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-02-04 21:38:33 +01:00
Christian Ehrlicher
9ea00c70fb SQL/ODBC: Pass correct length to SQLColAttribute()
This ensures the tst_QSqlQuery::record() test passes when checking the
tablename.

Pick-to: 6.5 6.4 6.2 5.15
Change-Id: I146f9f627ea366c6813af61ce48b930ca1041b15
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-04 18:47:05 +01:00
Christian Ehrlicher
c5a2257e0b SQL/ODBC: misc cleanup
Cleanup the codebase a little bit:
  - move loop variable into for scope
  - use utils functions instead homebrew
  - avoid use of const_cast<>
  - simplify splitTableQualifier()

Change-Id: I6962f01c94a6b4e0e38ad1b229cdf6e8b3308c78
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-04 18:47:04 +01:00
Christian Ehrlicher
694a92ab24 SQL/ODBC: optimize toSQLTCHAR() - avoid an unneeded copy
Avoid an unneeded copy in toSQLTCHAR() when sizeof(SQLTCHAR) == 1 or 4
by directly writing the encoded data into the QVarLengthArray.

Change-Id: Ic4180343764fa1ca175a9cdd444c5359d664c754
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-04 18:47:02 +01:00
Ahmad Samir
18c73ad47d QCalendarBackend: de-duplicate some code
Change-Id: I158cb1a2c6245b07891201bd767f3a4398a885fb
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-02-04 04:37:10 +02:00
Axel Spoerl
4804dc9fc7 Remove redundant include statement from qgtk3theme.cpp
QSettings was included but not needed.
This patch removes the include.

Pick-to: 6.5
Change-Id: I9da146312f26f87eb863d6409b90988603cf46d3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2023-02-04 01:03:33 +01:00
Mikolaj Boc
ec535796fa Support Qt::WindowTransparentForInput in QWasmWindow
Change-Id: I31c72bcfff62efb28672d7740bf1096878c88cae
Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-02-03 22:03:52 +01:00
Mikolaj Boc
c4a350db34 Support Qt::NoDropShadowWindowHint in QWasmWindow
Change-Id: I37b8b4c4d6b717d5fcd32b0793c2209850747085
Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-02-03 21:48:19 +01:00
Friedemann Kleint
438096371c QtGui: Disambiguate static variables
They cause clashes in CMake Unity (Jumbo) builds.

Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: I3c51fb41d29e5c649537b999dced7e2d413b26a7
Done-with: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
2023-02-03 21:48:19 +01:00
Roland Pallai
03ac8c7397 QXcbConnection::getTimestamp: do not return stale timestamp
The problem is `PropertyNotify` event generated by
`xcb_delete_property()` at return could be reported as an actual
timestamp at next call due to a missing `state` filter.

Because `PropertyNotify` is generated even if an unchanged property
value is set we can get rid of this delete event easily.

This issue causes observable problems in kwin_x11 (KDE project)
too.

Fixes: QTBUG-56595
Pick-to: 5.15 6.2 6.4 6.5
Change-Id: Ice6cfa934e3769d86e9f7264e369dc5918c8542a
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: JiDe Zhang <zhangjide@uniontech.com>
2023-02-03 19:03:56 +01:00
Axel Spoerl
b464119dd4 Unblacklist stable tst_QWidgetRepaintManager
Failing test functions fastMove, moveAccross, moveInOutOverlapped seem
to be stable in the meanwhile. This patch removes the blacklisting.

Task-number: QTBUG-109036
Pick-to: 6.5
Change-Id: I9a2b015572e4d8a4eac196d3985c052030fd84e2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-02-03 18:44:55 +01:00
Morten Sørvig
bf5dbc61b3 wasm: convert a11y coordinates to window coordinates
The html accessibility elements are positioned relative
to the window a11y container. Convert the global (screen)
coordinates we get from QAccessibleIntreface::rect() to
window coordinates.

Pick-to: 6.5
Change-Id: Ifd4eb671def296b1eb418789b7ca85afa365e546
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
2023-02-03 18:42:21 +01:00
Morten Sørvig
34c3682157 wasm: fix accessibility crash on null parent
The code was a assuming that an a11y interface always
has a parent, which is not the case for the root interface.
Also factor out to a getWindow() function, to prepare
for re-use later on.

Pick-to: 6.5
Change-Id: I52a841bf94c712deb9603e8b9c2c878820c5f117
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
2023-02-03 18:42:21 +01:00
Morten Sørvig
2443f2be07 wasm: set contenteditable on canvas
We don't want to make the top-level screen contenteditable,
since that interferes with accessibility. Instead, make
the canvas contenteditable and install clipboard event
handlers there.

Also move follow-up settings which counters some of the
effects contenteditable (outline: none and inputmode: none),
and move aria-hidden.

Pick-to: 6.5
Change-Id: Ibe73d8d097acd948ba8920c781a2003db0a14f3d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-02-03 18:42:21 +01:00
Mikolaj Boc
43a77d4b64 Remove unused code in qwasmcssstyle
Since 32666691c2, icons have been set
manually on img elements. The css code assigning the icons to elements
is now unused - remove it.

Change-Id: I394f08371c80f0e374a5cc7e39d17bb6091d18dc
Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-02-03 18:42:21 +01:00
Edward Welbourne
b62ac40987 Move qtLocalTime() to qtenvironmentvariables.cpp as qLocalTime()
The new name better matches the names of existing functions there.
A comment on the old code noted that such a move should really be
done, so as to correctly share the environment-mutex locking.

In the process, move the (now three) time-related internal functions
from qglobal_p.h to a new qtenvironmentvariables_p.h since that's the
natural place for them given where they're defined (and the fact that
they're for internal use only).

Change-Id: Ib028baebaf31a806a2c0c97caaaba0a466c11cea
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-03 14:45:31 +01:00
Edward Welbourne
9d1a3582f3 Call _tzset() before localtime_s() in qtLocalTime()
Experiment reveals that we needs to, despite hints in localtime_s()'s
docs that seem to indicate it shouldn't be needed.

In the process document that POSIX mandates that plain localtime()
behaves as if it did call tzset(), since its branch of the #if-ery is
now the odd one out.

Pick-to: 6.5
Fixes: QTBUG-109974
Change-Id: Ic57753f246f14e183d2a56f131e8bed7347d2e20
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-02-03 14:45:13 +01:00
Mårten Nordheim
78c5ca4c85 Update the public suffix list
Pick-to: 6.5
Task-number: QTBUG-110333
Change-Id: I741feee3a19d0a104496f543d35a1f311a7228d6
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-02-03 12:56:59 +01:00
Mikolaj Boc
7c33f4be02 Support window masks on WASM
QWasmWindow is now implementing the setMask method, which translates
the received QRegion to a css clip path

Fixes: QTBUG-73260
Change-Id: Ie934c1e6ab650426bfc32154bf9e49a4a2aeb45b
Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-02-03 09:46:05 +01:00
Tasuku Suzuki
f54fab6125 Fix android build with -no-feature-settings
Add QT_FEATURE_SETTINGS to the android deployment conditions.

Pick-to: 6.5 6.4
Change-Id: I7721a06733becba65b6d1e8112fa8afb0b64e120
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-02-02 22:45:34 +00:00
Marc Mutz
67ed712235 q20::construct_at(): fix various issues
Fix several issues in 72c2cdbc57,
which I was too slow to review before it went in:

- use the correct feature macro, not __cplusplus
- use the correct signature (return T*, not void)
- don't make the function static
- add a comment mentioning the material difference to std::construct_at
- drop unneeded <qxptype_traits.h> include

Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: I39d1908f565b1c1a31d5741924ac173447ec9057
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-02 22:45:30 +00:00
Marc Mutz
c53fdcb5ee Q_APPLICATION_STATIC: add missing std::launder()
Unlike Q_GLOBAL_STATIC, a Q_APPLICATION_STATIC can be destroyed and
re-created multiple times (if QCoreApplication is, too). This means
we're basically in the std::optional case and require std::launder()
to avoid UB when the payload type has either of the following:

- a const member
- a reference member
- a vtable and different derived classes might be occupying the same
  space at different times

While we can probably exclude the latter, because we always construct
the same type, PlainType, in the storage, the first two can easily
happen.

Fix by adding the missing std::launder().

As a drive-by, remove the uneeded casting (and now launder()ing) of
&storage when passing to innerFunction(), which anyway takes its
argument as void*.

Amends 81a31beeb2, which changed
Q_APPLICATION_STATIC to use inline aligned_union storage instead of
the original implementation's unique_ptr.

Pick-to: 6.5 6.4
Change-Id: I065bd33812a40195109bf11d5bc79975f2f87cd5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-02 23:45:30 +01:00
Friedemann Kleint
d3f8d7fd41 QtCore: Disambiguate static variables
They cause clashes in CMake Unity (Jumbo) builds.

Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: I5f1fbee07872a742a78adc9864fe00c710ca24d0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-02 21:57:49 +01:00
Thiago Macieira
9d2f3e63b8 QMimeDatabase: add a test to ensure we can detect Unix specials
Pick-to: 6.4 6.5
Change-Id: I570832c9ac8b4e03bde8fffd173f7e743f42f22b
Reviewed-by: David Faure <david.faure@kdab.com>
2023-02-02 12:17:25 -08:00
Thiago Macieira
40dd38813c QMimeDatabase: don't stat() something that isn't a local file
We must check that the path is an actual file on the filesystem before
using native APIs. This regression was introduced by commit
047d8f36de.

[ChangeLog][QtCore][QMimeDatabase] Fixed a regression from 6.4.0 that
made certain QMimeDatabase functions that inspected file contents to fail
on Unix systems, if the file was not a native file (e.g., a Qt resource).

Fixes: QTBUG-110707
Pick-to: 6.4 6.5
Change-Id: I570832c9ac8b4e03bde8fffd173f7b4c6b164192
Reviewed-by: Igor Kushnir <igorkuo@gmail.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2023-02-02 12:17:24 -08:00
Thiago Macieira
bfe42ebdeb tst_QMimeDatabase: rename test to indicate what it really is
This test is calling mimeTypeForFileNameAndData(), so it doesn't
actually use the files.

Change-Id: I570832c9ac8b4e03bde8fffd173f77f138ef3434
Reviewed-by: Igor Kushnir <igorkuo@gmail.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2023-02-02 12:17:24 -08:00
David Faure
c609b8dba0 QSortFilterProxyModel: port to PMF connects for performance reasons
BEFORE:
   0.21 msecs per iteration (total: 56, iterations: 256)
   801,946 CPU cycles per iteration (total: 801,946, iterations: 1)

AFTER:
   0.084 msecs per iteration (total: 87, iterations: 1024)
   300,259 CPU cycles per iteration (total: 300,259, iterations: 1)

Change-Id: I5b2703c217bb25e18f1d9f6a1eda19c60e1edcb0
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2023-02-02 20:43:59 +01:00
Tor Arne Vestbø
ad42833d33 Apple: Detect missing bundle identifier when using location permissions
The location permissions database in /var/db/locationd/clients.plist
ties the location permission to the bundle identifier (among other
things), so a missing bundle identifier will result in the app asking
repeatedly for the location permission, as the permission is never
saved.

Pick-to: 6.5
Change-Id: I64ab5b8f8762804869c0f97debd97da817787808
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
2023-02-02 19:12:50 +01:00
Mårten Nordheim
7df8ef0a10 HTTP example: Reflow QMessageBox usage in if-statement
It gets hard to read like that.
And update mentions of 'SSL' to 'TLS' in the message while we're there.

Task-number: QTBUG-108874
Pick-to: 6.5
Change-Id: Ia7b27bfb3d99391b14ed396ca9a6400621022bf6
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-02-02 18:03:36 +00:00
Alexey Edelev
871f7a05db Revert "Revert "Add support for MultiABI with custom install dir of the android-build""
This reverts commit d7e8d5bb1b.

Reason for revert: Found a working solution for the issue.

Change-Id: Ia720cc63ece9dfb1a24067cdd9c3d79d4edbe3be
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-02-02 19:03:36 +01:00
Jan Arve Sæther
fd65f70974 Fix analog clock example to adhere to guidelines
Guidelines: https://wiki.qt.io/Qt6/Example-Guideline

Pick-to: 6.5
Change-Id: I12c65ae11e7906fd2e9dfb449072199560488aed
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2023-02-02 17:51:34 +01:00
Edward Welbourne
57a1c2b0d9 Correct an inaccurate comment in inDateTimeRange()
Change-Id: I43bf3bf448792bfac05dccb8b57047b264dfb269
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-02 17:22:29 +01:00
Ulf Hermann
41248f2590 moc: Allow calling ctors on pre-allocated data
When calling a ctor this way, an object is created in the memory pointed
to by _a[0] using the other arguments for the ctor.

This allows separate allocation and initialization of an object through
the metaobject system.

Fixes: QTBUG-108879
Change-Id: Ifb154373ee42faab281cfb62aa14334980ec6b7d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-02-02 15:57:09 +01:00
Ahmad Samir
b291217457 QString: remove some redundant unittests
The QChar::toLatin1() args in:
str.replace(index, len, QChar(after[0]).toLatin1())
s2.replace(ch.toLatin1(), after, cs)

will be converted to QChar, so it's always calling the same QString
overload, I argue that we're not testing QChar implicit conversions
here.

Change-Id: I3962cab2b34684f970638575e6bd15dd1067a8c6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-02 15:57:18 +02:00
Santhosh Kumar
9a1b7c7fa5 Reset dark palettes for widgets to light in windows style
Windows theme in dark mode set dark palettes for checkbox,
radiobutton, menu, menubar explicitly. The fix added as part of
a2518b4140 (to use light palette for
windows style) overrides only system palette and widget specific
palettes are still with dark palettes.

In this patch, the windows style overwrite dark with light palette
for widgets that are explicitly set with dark palette in windows
theme.

Fixes: QTBUG-110432
Pick-to: 6.5
Change-Id: I2af0e517d62981f062244eeab8f1b5e5442cc451
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-02-02 14:57:18 +01:00
Laszlo Agocs
0b20f243f7 Modernize the VK_EXT_debug_utils callback
...as suggested by review comments.

Switching to std::function implies that we cannot easily
do the install-remove pattern anymore as there is no way to
compare an std::function to something other than null. Instead
of making it more complicated by returning a key or something
like that, change the remove function to a clear (that now clears
both the legacy VK_EXT_debug_report and the new VK_EXT_debug_utils
callback lists).

Also add a missing call that registers the new-style callbacks that
are installed before create().

Pick-to: 6.5
Change-Id: I66c1dd8e8dcc8eee0f5eb9671f94c2c80319dcaf
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kristoffer Skau <kristoffer.skau@qt.io>
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2023-02-02 14:57:18 +01:00
Ahmad Samir
a14bcdfcc9 QtMiscUtils: replace uint args with char32_t
Also change isAsciiDigit() to take a char32_t, so that something like
this works:
QChar ch; isAsciiDigit(ch.unicode())

casting char16_t to uchar is narrowing, and gives weird results. C.f.
QSettingsPrivate::iniEscapedKey() and the QSettings unittests which
uses some unicode characters.

Task-number: QTBUG-110403
Change-Id: Id978a6b2874bc6869ae3ffb28d1887d932c37782
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-02 15:57:18 +02:00
Sze Howe Koh
4bfdf6a3d1 QAnyStringView: fix MSVC warning C4702
The previous fix attempt at 8ba8d1346a
does not work when C++20 mode is enabled.

MSVC optimizes away the "else" block but triggers warning C4702 on
"return true". Moving the return line into the "else" block ensures that
it is optimized away too.

Change-Id: I9ef02cd3631ff78091530b6fb2b91c2eddcbab5d
Pick-to: 6.5 6.4
Fixes: QTBUG-104836
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Yuhang Zhao <yuhangzhao@deepin.org>
2023-02-02 21:53:25 +08:00
Marc Mutz
c307cbea90 Q*Permission: un-Q_GADGET classes w/o Q_ENUMs
We can always add it back later, but for now, it's pointless overhead
(no Q_PROPERTYs, no Q_INVOCABLEs).

Found in API review.

Pick-to: 6.5
Change-Id: I1e30fbda997e6576a3e94cbae0387a3188c27728
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-02-02 14:34:02 +01:00