Commit Graph

57163 Commits

Author SHA1 Message Date
Marc Mutz
6b6b88774b QLine/F: mark as primitive type
QPoint/F are, then so are QLine/F, being a pair of points.

Found by static_assert()ing !isComplex in QDataBuffer.

Pick-to: 6.4
Change-Id: I358a38d79820c9262a86018253002bc991c5a6e4
Reviewed-by: Lars Knoll <lars.knoll@gmail.com>
2022-07-08 22:14:52 +02:00
Marc Mutz
0a1fe50d0b Pass QFixed by value
It's a glorified int, so pass it by value instead of cref.

Pick-to: 6.4
Change-Id: I1c7a37614cd0d2dac63d2d549563600d401d6dad
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@gmail.com>
2022-07-08 22:14:52 +02:00
Marc Mutz
13764280b4 QFixed: add implicit conversion from long long
This will come in handy when porting some GUI code to qsizetype.

Pick-to: 6.4
Task-number: QTBUG-104818
Change-Id: I426a4f425ebd7a9fdc2d2bba97dae4c640ded97e
Reviewed-by: Lars Knoll <lars.knoll@gmail.com>
2022-07-08 22:14:52 +02:00
Marc Mutz
44653cdf4c QFixed: stream-line relational operators
- make them hidden friends
- take lhs and rhs each by value
- noexcept
- remove useless mixed relational operators with int: Every fix op i
  is now compiled as fix op QFixed(i) with no loss in performance.

Pick-to: 6.4
Change-Id: If4d0a43fd964547de59fed4ba2cdfea0cf176809
Reviewed-by: Lars Knoll <lars.knoll@gmail.com>
2022-07-08 22:14:52 +02:00
Marc Mutz
9b92f59940 QFixed: remove user-defined assignment operators
They don't give us anything: For every op=(X), there's an implicit
QFixed(X) constructor that will resolve any

  fix = x;

as

  fix = QFixed(x);

with no performance penalty.

Pick-to: 6.4
Change-Id: Ia5b0364617a646f3cf122b47363d6099548bb5c2
Reviewed-by: Lars Knoll <lars.knoll@gmail.com>
2022-07-08 22:14:52 +02:00
Marc Mutz
464607abb9 QRasterPaintEngine: replace a QPair with a struct
Gives better naming for the members. A range consists of {begin, end},
not {first, second}.

Pick-to: 6.4
Task-number: QTBUG-104818
Change-Id: I3d6c7be2a137e1c03149d1d86ce9db38ec28a1fb
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-07-08 20:14:51 +00:00
Marc Mutz
215f0e4ea6 QFontSubset: remove unused glyphName() overload
Amends b7f3253f906594ec1971fbea3a5760dcf8f01cdd(!).

Pick-to: 6.4 6.3 6.2 5.15
Change-Id: I39dd2efee241afc2a57d0eb614d3a396fef95b9e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-07-08 22:14:51 +02:00
JiDe Zhang
1d961491d8 Always update QPalette resolve mask, regardless of QBrush change
56bd1b76d2 changed the update
resolve mask behavior in QPalette to avoid detaching brush data
when modifying the resolve mask if the brush value is not changed.

But this behavior broke compatibility, it introduced unknown risks, and
we cannot ensure that other code in Qt does not depend on the old
behavior.

We both need to ensure that we don't detach when the value is not
changed, and ensure that the resolveMask is always updated regardless
of whether the value changes, so we need to split them up and
independently share the brush data.

QFont will update its corresponding resolveMask even if the value has
not changed, so it is better to correct this behavior so that QPalette
and QFont are consistent.

[ChangeLog][QtGui][QPalette] Always update resolve mask in
QPalette::setBrush, even if the value of brush has not changed.

Fixes: QTBUG-98762
Pick-to: 6.4 6.3 6.2
Change-Id: Ib845361b30f21c3d78c16ced923c1678b12e05ac
Reviewed-by: JiDe Zhang <zhangjide@uniontech.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-07-08 17:09:04 +00:00
Alexandru Croitor
bea66711d8 CMake: Don't create duplicate plugin targets in shared builds
when building Qt repositories.

When building for example qtquick3d, the Qt6QmlPlugins.cmake
file should not load the qtquick3d specific plugin config files
because the targets will be created as part of the build and cause
duplicate errors.

We already did it for static builds, but now we also do it for shared
builds.

Amends 7d6f1ee5a7
Amends 98e8180e56

Pick-to: 6.4
Task-number: QTBUG-94066
Change-Id: I66ca71dfa6485eded94c1ecb5eb3b23daf908b39
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-07-08 15:07:38 +02:00
André de la Rocha
083ff27518 Windows QPA: Implement Selection UIA pattern for QTabBar
Adding Selection pattern for tab bars and SelectionItem pattern for
tab items, which are required for accessibility compliance.

Pick-to: 6.4 6.3 6.2
Fixes: QTBUG-104740
Change-Id: I0e3b1cfbf4838d8bc8b5bc2e2d7c9d372ac8b99d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2022-07-08 10:06:07 +02:00
André de la Rocha
9aaf105bad Windows QPA: Report the expanded/collapsed state of tree items
Implement the ExpandCollapse UI Automation pattern for tree items,
so that accessibility tools like MS Narrator are able to report the
item state.

Pick-to: 6.4 6.3 6.2
Fixes: QTBUG-103988
Change-Id: I1529bdb0104c6e29d8f28bc0bbb8a7fa4670c7ef
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2022-07-08 08:05:21 +00:00
Tor Arne Vestbø
efbcc80010 QFontDialog: Check if native dialog is in use before using
A call to platformFontDialogHelper() will lazily create the helper,
and is not enough to distinguish whether the helper is actually in
use. The explicit nativeDialogInUse flag also takes properties like
DontUseNativeDialog into account, which may be set after the dialog
is first constructed.

Fixes: QTBUG-104696
Pick-to: 6.2 6.3 6.4
Change-Id: Ia00a39bba4aaae8c99ae0cdd6543c2e451f72ea6
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2022-07-08 10:03:32 +02:00
Ivan Solovev
13868474f9 Move numeric functions from qglobal.h to qnumeric.h
Task-number: QTBUG-99313
Change-Id: Ic7f7d6ea6d2b81a8593c7cfe05aee1d62921afd1
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-07-08 09:50:05 +02:00
Richard Moe Gustavsen
e44edaac2c QWidget: use WA_InputMethodEnabled when ImEnabled is not implemented
In Qt 6.3, a check for WA_InputMethodEnabled was removed
in QWidget, to support IM queries also for read-only
widgets (7c6e4af48). This caused a regression on iOS, which
made the input panel open for widgets that didn't support
IM at all.

A patch was merged that solved the regression (3b12305575),
but it didn't take the widget attribute into account.
Since not doing so has the potential to cause regressions,
this patch will modify the affected code once more, so that
we instead fall back to test WA_InputMethodEnabled when
ImEnabled is not implemented. This will match closely
to the way ImEnabled was implemented in Qt 6.2.

Since we, with this change, now require that either ImEnabled
or WA_InputMethodEnabled is set, our own input widgets will
fail to support IM text selection when they're read-only, since
they actually don't implement ImEnabled.
This patch will therefore also make sure that we do so.

Task-number: QTBUG-104527
Pick-to: 6.4 6.3
Change-Id: I70ad910aec38d0a74f4dd7d3115d3c45c16d2b3b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-07-08 09:41:29 +02:00
Ulf Hermann
66a30b9a33 moc: Allow writing properties through bindables
BINDABLE should generally behave the same as MEMBER if "WRITE default",
except where it cannot. In particular we cannot know if any NOTIFY
signal should be sent from the synthetic WRITE accessor.

[ChangeLog][QtCore] moc will now synthesize WRITE accessors for
properties with BINDABLE if you specify "WRITE default".

Task-number: QTBUG-97249
Change-Id: I883c40ba0dda7989c840971860addaeaa75a8c83
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-07-08 09:38:27 +02:00
Samuli Piippo
d56f80fd9a rcc: fix build when cross-compiling
The zstd feature is now public, which enabled it in rcc even when rcc
was cross-compiled, but rcc was not linked agaist zstd library.
There is no need to test for cross-compilation anymore or to add
the extra define.

Amends eda4919f252c53f313441afbedb4d0f98e94c9a

Pick-to: 6.4 6.3 6.2
Change-Id: I23987ae0903759cf4f3fd17059c71c8815b8d908
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-07-08 07:38:24 +00:00
Shawn Rutledge
e1f25b1c8d Make it possible to check the accepted state of touch events in tests
QTouchEventSequence simulates a QPA touch event, potentially containing
multiple points. (Despite the name, it only calls qt_handleTouchEvent()
once, so it cannot really send a sequence of events; however, one event
can contain multiple touchpoints.) Delivery is synchronous, and we keep
return values through the QWindowSystemInterface::handleTouchEvent()
template functions; so the remaining step is to return a bool from
qt_handleTouchEvent(), so that we can return a bool from commit().
This allows tests to see the same perspective as a platform plugin can:
check whether the event was accepted or not, after delivery is complete.
Some tests in Qt Quick need to start doing that, to enforce correct
behavior in QQuickDeliveryAgent.

[ChangeLog][QtTestLib] QTouchEventSequence::commit() now returns a bool
so that tests can check whether the event was accepted during delivery.

Pick-to: 6.4
Task-number: QTBUG-104656
Change-Id: I9cf87909a3f847dedbdeca257013e309ac19cf0d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-07-08 06:12:03 +02:00
Mate Barany
0d5d914dbf qdbuscpp2xml: Finish migration to qsizetype
Inspect and change int types to qsizetypes where necessary.

Fixes: QTBUG-103550
Change-Id: Ib92553ab214d06c8daecaa0c48ae2c2e4e32fdb7
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-07-07 20:31:01 +02:00
Laszlo Agocs
cd3a6fa414 rhi: Fix up the instancing step rate type
This is a UINT/uint32_t/GLuint/NSUInteger in all APIs (with Metal
being special due to being 64-bit in 64-bit apps whereas all others
are 32-bit always, at least on 64-bit Windows)

As the stride is already an uint32, follow suit for the step rate.
There was no reason to have this as int in the first place.

As an added bonus, some casts, that were previously needed when
mapping to the underlying API reality, can now be removed.

Change-Id: I8e0eef037bd795b637578dfc3e59dc2efaa5976c
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2022-07-07 17:53:23 +02:00
hjk
6619c94087 rcc: Suppress clang's -Wexit-time-destructors
It's an opt-in warning that some people like to use. It was introduced
to clang 3.0.0 in 2011 by

   98766db785

However, the feature is intentionally used here and the generated code is legit.

Make both sides happy.

Change-Id: I79335cd3a6a6cc128fa65f77d201a12f67424260
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-07-07 17:53:23 +02:00
Tor Arne Vestbø
e27a0d5a0f Disable bitcode for iOS
It's deprecated as of Xcode 14, and generates a warning message if a
project explicitly enables bitcode. The App Store no longer accepts
bitcode submissions from Xcode 14.

Pick-to: 6.2 6.3 6.4 5.15
Change-Id: Ib1f9d5114ca4d8b1845ecc7a9de0473ee015db33
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-07-07 17:02:37 +02:00
Laszlo Agocs
c9d1d4c33c rhi: Fix a manual test
...that uses the old name after a recent change in the
name of a function.

Change-Id: Ife36fbb0c5d28b350cb1cfc48625528a205af8f9
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2022-07-07 16:07:18 +02:00
Joni Poikelin
da43c180c8 Fix crash in QKmsDevice::createScreenForConnector
Fixes: QTBUG-104809
Pick-to: 5.15 6.2 6.3 6.4
Change-Id: Ic71311e5cb674da46a4a1065dae739bc9ac6e285
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2022-07-07 15:47:14 +03:00
Morten Sørvig
4cc84dc31c Revert "Apply ScaleFactorRoundingPolicy to QT_SCREEN_SCALE_FACTORS"
Unblock the qtdeclarative dependency update.

This behavior change is causing a regression for QQmlPreviewHandler's
zoom feature. Back out of the change for now, until we can find a way
to make both use cases work.

This reverts commit 1c0a56a2f3.

Change-Id: I1b3d84504bbcb4f2b2250a20194fdaf4ab4fd97f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-07-07 14:47:14 +02:00
Tor Arne Vestbø
cb51ab41e8 Windows: Account for not finding child windows when calling ChildWindowFromPointEx
The main code path of findPlatformWindowHelper had a check to verify
that the resulting child was not the parent HWND handle itself, but
the code path for handling QTBUG-40555 was missing this check, resulting
in infinite loops when the top level window was a transparent window.

We add the same kind of check to this code path, where neither the
hwnd out pointer or the result out pointer is updated. This is okey
since we return false and don't expect the function to continue
iterating based on an updated hwnd pointer.

Ideally the iteration logic should be moved into findPlatformWindowHelper
instead of having the outer loop outside of the function, but that's
left for another day.

Fixes: QTBUG-103571
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: I9465253bca52bebf9137b24d7ce36646553d8d39
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-07-07 11:20:40 +00:00
Tor Arne Vestbø
91710d8d76 Clarify the role of the two QPlatformFontDatabase::fontEngine overloads
Change-Id: I81c59dad3479a783db8883f31e7ca9962ce959ff
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-07-07 13:20:40 +02:00
Juha Vuolle
c5caab1f15 Add support for scoped JNI callbacks
This commit adds macros for declaring scoped native callbacks which are
in namespace or for example defined as static class member variables.

The existing macros don't allow this as they use QtJniMethods namespace
and the introduced callbacks' namespaces are not enclosed in that
namespace, yielding a compilation error.

Pick-to: 6.4
Change-Id: I754560bea7e9a1b57c2661d1ee7236e78db39ba1
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-07-07 13:35:08 +03:00
Waqar Ahmed
97ec867ab5 Move QObjectPrivate::Connection* structs to a new header
Partially reverts 06c2478

Even though these structs are not meant to be used anywhere outside
QObject, some special applications like Gammaray need them to get
details about connections.

Pick-to: 6.4
Fixes: QTBUG-104734
Change-Id: Ied73021e317cc6aed6192c229d9450ae48b6774c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-07-07 13:42:59 +05:00
Mate Barany
cc70757964 qdbusxml2cpp: allow choosing <> over ""
qdbusxml2cpp's -i option uses "" for the includes.
However, an option to include with <> would be also
desirable, since some compilers may use a different
search strategy for <> than for "".

Add a new command line option -I/--global-include
to include the given argument using <>.

The new option will be used in qtconnectivity.

[ChangeLog][qdbusxml2cpp] Added command line option
-I/--global-include to include header files with <> in
the generated files.

Fixes: QTBUG-103362
Change-Id: If8e7f8b86440bdec53f2517db1ad460912664b20
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-07-07 07:44:16 +00:00
Lu YaNing
9e7c567050 QIcon: remove icon from cache if the cached engine fails to load
An icon that is not null by the time it is inserted in the cache can
become null, depending on the QIconEngine implementation.

For example, when an application with a shortcut exists on the desktop,
uninstall the application, and then install the application again, the
acquisition of the application icon will fail. The reason is that after
installing the application for the second time, the qtIconCache will not
be updated when the icon is acquired.

Done-with: Volker Hilsheimer <volker.hilsheimer@qt.io>
Pick-to: 5.15 6.2 6.3 6.4
Change-Id: I6dc8cf435815b92da270d74fe992843336af23e2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-07-07 07:44:16 +00:00
Mikolaj Boc
fb8832de9c Make the promises js-less using a newly introduced thunk pool
Since we cannot rely on the clients specifying a suitable CSP that will
not forbid execution of js injections, we have to refrain from using
any explicit <script> elements. To keep the promise system working, a
thunk pool was introduced which keeps track of a limited pool of promise
callback exports. In case the resources are busy, pending calls are
enqueued. This works since the JS Promise.then/catch/finally always fire,
even on ready/failed promises.
As the situation of full thunk pool allocation is unlikely to happen
en masse IRL, the solution should not adversely affect the performance.
Heavy unit tests were created to confirm the solution works as expected.

Task-number: QTBUG-99611
Change-Id: I0e6982d4ee76a4263b59e72b004b3ff2f167e4df
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-07-07 06:28:13 +02:00
Ilya Fedin
dbe858bf80 QGtk3Theme: Respect xcb_xlib config option
Pick-to: 6.4 6.3 6.2
Change-Id: I4b01a694e8a13a6f009296d8ccfa8f8eb21043e4
Reviewed-by: Liang Qi <liang.qi@qt.io>
2022-07-07 02:06:14 +04:00
Ilya Fedin
3d45f23b02 QGtk3Theme: Ensure gtk uses the same windowing system as Qt
Fixes: QTBUG-69354
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: I254c5bf98bc3b2cc2577159e475a2105438bb96b
Reviewed-by: Liang Qi <liang.qi@qt.io>
2022-07-07 01:48:59 +04:00
Allan Sandfeld Jensen
f1a3069afb Unify QFontEngine::boundingRect for coretext and Windows
They were both using the same algorithm, and also both had the same
mistake of not handling left-bearing. This unifies them and adds left
bearing handling.

Change-Id: Id06392abde0bfeb8b49faf4632082b2e25352497
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-07-06 20:46:53 +02:00
Joerg Bornemann
d754e43721 Make WrapOpenSSLHeaders an optional dependency of the OpenSSL plugin
When configuring Qt statically with OpenSSL support on macOS,
configuring a user project would fail, because WrapOpenSSLHeaders could
not be found.

Configuration fails, because we don't record OPENSSL_ROOT_DIR anywhere,
and WrapOpenSSLHeaders is a required dependency of the OpenSSL plugin.

Make the WrapOpenSSLHeaders dependency optional like WrapVulkanHeaders
for QtGui.

Note that when Qt is statically configured with -openssl-linked on
macOS, configuration of user projects will still fail like described
above.

Pick-to: 6.4
Fixes: QTBUG-96283
Change-Id: I0893e18767387ea849c7e5661f5421b71e3f64ab
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-07-06 18:41:32 +02:00
Sona Kurazyan
a6acb2453f QRegularExpression: fix a typo in docs
Pick-to: 6.4 6.3 6.2
Change-Id: Id7db7d0b833fc6b6000a04ff7ee8a5a7d164d7de
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-07-06 18:41:32 +02:00
Sona Kurazyan
ed715cf8a7 Porting guide: recover the missing section title
4cc1d81d79 accidentally removed the
section title, recover it.

Pick-to: 6.4 6.3 6.2
Change-Id: Idb4e5732f181505b8b9eebb1bf3635741a084657
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-07-06 18:41:32 +02:00
Sona Kurazyan
6ad481c31f Revert "QFutureCallOutEvent: de-export again"
QFutureCallOutEvent is used externally, so it needs to be exported.

This reverts commit 3141a13b2a.

Fixes: QTBUG-104732
Pick-to: 6.4
Change-Id: I82c9e7414192ee948f78259bd74a404691a7805a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-07-06 18:41:31 +02:00
Ilya Fedin
edee40a179 QGtk3Theme: Use GDK X11-specific API only built with X11
And respect xlib config option

Pick-to: 6.4 6.3 6.2
Change-Id: I596097259ed008357e739c3cfe41ab2fc4e18db7
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2022-07-06 20:41:31 +04:00
Samuli Piippo
6eda4919f2 rcc: teach qmake not to use zstd when not available
The zstd feature might have different values between the host
and target, in which case qmake must tell rcc not to use zstd
when the feature is disabled.

Amends 14546d1816

Fixes: QTBUG-103794
Pick-to: 6.4 6.3 6.2
Change-Id: Ia0378742a50e2a85f59985dea2506d3dda5f28e8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-07-06 19:41:31 +03:00
Morten Sørvig
1c0a56a2f3 Apply ScaleFactorRoundingPolicy to QT_SCREEN_SCALE_FACTORS
QT_SCREEN_SCALE_FACTORS in many cases set on behalf of the user,
instead of by the user, so we should make it less sharp and more
in line with standard high-dpi configuration.

Specifically, make it subject to the rounding policy set by
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(). This
means that applications which support integer scale factors
only will see integers only, also when QT_SCREEN_SCALE_FACTORS
specifies a fractional factor.

Users who want to override can set

  QT_SCALE_FACTOR_ROUNDING_POLICY=PassThrough

to restore the default Qt rounding behavior.

[ChangeLog][QtGui] The high-DPI scale factor rounding policy (settable with
QGuiApplication::setHighDpiScaleFactorRoundingPolicy() or
QT_SCALE_FACTOR_ROUNDING_POLICY) now applies to scale factors set
with QT_SCREEN_SCALE_FACTORS.

Pick-to: 6.4
Fixes: QTBUG-95930
Fixes: QTBUG-99546
Change-Id: Ibb0aa5cb9d3a356d33429d0efe69d984b2530728
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-07-06 15:56:58 +00:00
Morten Sørvig
bc6dea891e High-dpi: Add test for setting the scale factor rounding policy
Test setting both via QGuiApplication property and environment.

Change-Id: Iaccc920adb6294d610b02d4c844aa5b15eb7eecd
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-07-06 17:56:58 +02:00
Morten Sørvig
e1c8ad359d Reset highDpiScaleFactorRoundingPolicy in QGuiApplication destructor
Make sure we start with the default state if the app object is deleted
and created again, like for the other static variables.

Change-Id: Ie97a73022298d21c9fbaaefcae3091b637264401
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-07-06 17:56:58 +02:00
Morten Sørvig
5b23f08b81 wasm: use simpler syntax for EXPORTED_RUNTIME_METHODS
Recents emsdk versions support specifying the method list without
using brackets. Switch to this syntax since that avoids any quoting issues.

Pick-to: 6.4
Change-Id: Ib7bf8ec3f0d2ef67e8222a23e7af9b368ee99a00
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-07-06 17:56:58 +02:00
Morten Sørvig
36fa489cb8 wasm: remove message handler lock
We have now upgraded the minimum emsdk to one where Emscripten properly
synchronizes stdout/stderr output.

Pick-to: 6.4
Change-Id: I537897b31916a52303a3fdb1d255f03b4aeaffef
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-07-06 17:56:58 +02:00
Morten Sørvig
9be0f2945d wasm: begin work on accessibility backend
Implement a11y support by adding html elements of the
appropriate type and/or with the appropriate ARIA attribute
behind the canvas.

Also add a simple manual-test.

Change-Id: I2898fb038c1d326135a1341cdee323bc964420bb
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2022-07-06 17:56:58 +02:00
Morten Sørvig
25c2d05340 wasm: don't access deleted settings objects
The emscripten_idb_async_ functions are async, so there
is no guarantee that the QSettings object which made
the request will be live by the time the completion
callback is made.

Keep track of live QWasmSettingsPrivate objects, return
early from the callbacks if userData does not point
to a valid QWasmSettingsPrivate.

Pick-to: 6.4 6.3 6.2 5.15
Change-Id: Ia319b1875dcf2c329ba27954e3f026e004fe0aac
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2022-07-06 17:56:58 +02:00
Marc Mutz
c84897c137 QDebug: add op<< for std::initializer_list
We need it in QtHttpServer.

[ChangeLog][QtCore][QDebug] Can now stream std::initializer_list.

Change-Id: I3e940215fb4f4778bd782ea9b30960754ac23d47
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
2022-07-06 17:56:58 +02:00
Marc Mutz
0587d4752d Remove uses of Q_ATOMIC_INT{8,16,32}_IS_SUPPORTED
It's always true these days, assert so in qatomic.cpp and
tst_QAtomicInteger.

Update the docs.

Pick-to: 6.4
Change-Id: I3684cff96c1d2e05677314e29514cc279bd6b1a1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-07-06 17:56:58 +02:00
Marc Mutz
c0385f0cee QAtomicInteger docs: mention bool and char8_t as 8-bit types
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: If673ba1e891e034dfe5e441b1e3427f3365320e6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-07-06 17:56:58 +02:00