Commit Graph

42606 Commits (070446d5ebf2a82531160268fbae0bb7c6730ecd)

Author SHA1 Message Date
Ievgenii Meshcheriakov 8bada697d6 QTlsBackendOpenSSL: Early return from ensureCiphersAndCertsLoaded()
Add an atomic state variable to perform early return without taking
a recursive lock after ensureCiphersAndCertsLoaded() is complete.

Make related mutex and state variable function-local static because
they are not used anywhere else.

Taks-number: QTBUG-103559
Change-Id: I1e4c9c4f73204885bce82ba7f2b5e64548c3aac3
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-09-07 12:39:25 +00:00
Rafael Roquetto 42c1e3c334 Revert "Fix build with -trace lttng"
This reverts commit 756c65d367.

"justified_worry" is an incorrect workaround which attempted to silence
tracegen when invalid types were being used. This caused Qt to compile,
but with broken/invalid tracepoints.

The proper solution involves fixing the tracepoints in question.

Change-Id: I96de254944f0367808527d215e87a5d66bb442f4
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-09-07 22:39:25 +10:00
Alexey Edelev 8539e641f6 Respect CMake source tree when installing header files
Use CMake source tree when installing header files instead installing
all header files that syncqt.pl produces. This avoid adding header
files which cannot be used because of platform or feature
incompatibility with Qt version. Since syncqt.pl doesn't respect CMake
build tree when generating master header and CaMeL case header files,
these header files still will be installed regardless platform or
feature limitations. This will not be the case once we switch to
syncqt.cpp, which will install only headers that are relevant to the
selected platform and enabled features.

Task-number: QTBUG-103196
Change-Id: I7d64754648747bee700d96f2fd6228fe7248512e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-09-07 14:39:25 +02:00
Marc Mutz 6bdde52957 [docs] qCompress/qUncompress: document size limits
Zlib uses ulong in the interface, which, at least on Windows, is a
32-bit type, so qCompress cannot consume input and qUncompress cannot
produce output greater than ULONG_MAX, even on 64-bit platforms.

Document this limitation.

Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-104972
Change-Id: I56c926a67f8705ef773977a86e157e6eb26aa585
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-09-07 13:00:23 +02:00
Marc Mutz c97bcaaa1a qUncompress: statically assert that arithmetic overflow cannot occur
... because the limit we check against, doubled, is still within the
range of size_t.

Took me a while to prove this to myself, so document the finding in a
static assertion.

Pick-to: 6.4 6.3 6.2
Change-Id: Ib2d1bb825c1693ccc4ffa1d8fc0bd455a170337f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-09-07 13:00:23 +02:00
Yuhang Zhao 0d20e6e495 Doc: Add missing since 6.2 to QImage and QPixmap
The deviceIndependentSize() function of QImage and QPixmap was added
in Qt 6.2 but their docs are missing this information, so add them.

And it seems the QImage docs were copied from QPixmap, so it still
reference to pixmap, not image, fix it as a drive-by.

Pick-to: 6.4 6.3 6.2
Change-Id: Ic3d0a2019b5e9b89bd8723d994d7ae54f2cb5257
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-09-07 09:22:50 +08:00
Mårten Nordheim c76f7cbbcb QTextStream: Fix logical error in setEncoding
We only want to enable writing BOM if we have _not_ started
writing.

Fixes: QTBUG-106279
Pick-to: 6.2 6.3.2 6.4 6.4.0
Change-Id: Ibcbc101b931615fddb2507f01307bf9619772d7b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-09-07 01:09:31 +02:00
Lorn Potter afb2fdc107 wasm: export new Promise functions
Needed for shared libs/dynamic linking

Change-Id: I9b035951b1713d4ed5c98713b3d5e6b5e0293378
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-09-07 08:07:16 +10:00
Thorbjørn Lund Martsum 06556d079a Refix QDockwidget drag out dockwidget
In f082458c46 a fix attempt was made
and in a lucky example on Mac it worked well. However, the logic was
still not correct and that could be seen in other systems/examples.
This patch updates the logic to be the correct behavior in
general.

Pick-to: 6.4 6.3 6.2 5.15 6.4.0
Fixes: QTBUG-106064
Change-Id: I3b098be9942d37c367b146a7359185bcfd127762
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-09-06 20:35:28 +02:00
Alexey Edelev 05cc5b3541 Introduce the qt_deprecates pragma
The qt_deprecates pragma indicates that the file passed as argument
is deprecated and supposed to be replaced by the file where the pragma
is defined. Syncqt procedure generates the file passed as argument
automatically with the deprecation warning. After the deprecation
period the pragma should be removed and the deprecated file will not
be included to the Qt installation too.
The pragma is only handled by the cpp version of syncqt cpp and
supposed to replace the 'deprecatedheaders' record in sync.profiles.

Change-Id: Ibe69423a5de67f58907a3edbc5961f5ab63944de
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-09-06 20:15:00 +02:00
Sona Kurazyan d674f3f545 QXmlStreamReader: use qOffsetStringArray for storing token types
Change-Id: I9e58c17d97c44e1b13899d30396f65b452d8600f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-09-06 15:15:40 +02:00
Thiago Macieira d6fae59faa 3rdparty: apply a fix to the last zlib fix
Source:
1eb7682f84

Pick-to: 5.15 6.2 6.3 6.4
Change-Id: Ic6547f8247454b47baa8fffd17111732eb074b0a
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-09-06 09:34:43 -03:00
Shawn Rutledge 83e70c3157 Use QVarLengthFlatMap for QPointingDevicePrivate::activePoints
It's good to use a pre-allocated set of points that never changes,
because queryPointById() returns a pointer to the stored instance.
If the flatmap's values are in a QList, and a mouse event comes in at
the wrong time while touchpoints are already stored there, causing
the QList to be resized, the returned pointer can become garbage.
The pointer returned from queryPointById() is never retained for long,
but in practice it turned out this could still happen, at least on X11
(perhaps because of X11 synthesizing mouse events from touch).

Using a pre-allocated QVarLengthFlatMap is also an optimization: events
on single-user systems are unlikely to ever cause memory allocation in
this part of the code.

Many touchscreens support up to 10 touchpoints, but the user might
have some other input devices, plus the "core pointer" (mouse).
The user could also have two touchscreens and try to use them
simultaneously.

d4611ba3a5 added QVarLengthFlatMap along
with a test using int keys; so we expect that will keep working now.
There was some issue in 2020 which is why I didn't use QVarLengthArray
for the QFlatMap key and value containers to begin with.

Pick-to: 6.2 6.3 6.4 6.4.0
Fixes: QTBUG-106223
Change-Id: I588f66f07126b9551937a369df44f045759b473d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2022-09-06 12:34:43 +00:00
Mikolaj Boc df4be70740 Clear the timer target time when stopping a timer on WASM
Not clearing the target time makes the subsequently created timers not
get their time ticks, as no actual timeout will be registered as the
dispatcher wrongly assumes there will be a tick fired, which there isn't.
Since there are no updates, the WASM compositor enters an infinite
window update loop where it requests an update on a window, and the
window requests an update on it, getting the update request back due to
an animation running forever.

Pick-to: 6.4 6.4.0
Fixes: QTBUG-105347
Fixes: QTBUG-102004
Fixes: QTBUG-104518
Fixes: QTBUG-106153
Change-Id: I14b8dd08df81852e28e8527545c8530e0656990d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-09-06 11:59:57 +00:00
Alexandru Croitor 6abaff810a CMake: Collect IMPORTED library dependencies for android deployment
Previously _qt_internal_collect_apk_dependencies() only collected
targets that were built by the current project and informed
androiddeployqt their directory paths for deployment consideration.

The libraries would be bundled into the apk based on whether
the application links to any of those libraries directly,
e.g. via target_link_libraries.

CMake 3.21 added a new feature that allows us to query all IMPORTED
targets in a directory scope. Using this information we can now tell
androiddeployqt about these libraries as well, of course only when a
new enough CMake version is used. Introduce
_qt_internal_collect_apk_imported_dependencies_defer to do that.

In contrast to _qt_internal_collect_apk_dependencies(), the IMPORTED
libraries are collected by recursively looking at a target's directory
scope and its parent directories, rather than child subdirectories.
Also, the collection / deferral is done when the target's directory
scope has finished processing, rather than when the root project
has finished processing.
Why? IMPORTED libraries are usually non-global, which means we can't
refer to them in parent scopes using functions like
get_target_property, the targets don't exist in those scopes.

Note that the code only covers IMPORTED target libraries. It
does not cover INTERFACE libraries, plain library names or
file paths specified in target_link_libraries.
It also doesn't account for loadable libraries (dlopen()ed ones).
In such cases, projects still need to manually specify the library
paths in the executable's QT_ANDROID_EXTRA_LIBS target property.

To prevent the deployment json file from being extra long when
looking for IMPORTED libraries, filter out paths to Qt modules or
plugins by checking for the _qt_package_version property.
These are handled via a different code path in anddroiddeployqt,
so there's no reason to duplicate the information.

Added documentation for how to opt out of this new behavior.

Amends d20f4ae706

[ChangeLog][CMake][Android] Imported targets are now considered
during Android deployment when using CMake 3.21+.

Fixes: QTBUG-94714
Fixes: QTBUG-105165
Change-Id: I9f01cdc4e63004e4768027e412899e441e72bf04
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-09-06 13:24:09 +02:00
Alexandru Croitor 8cbe8e8266 CMake: Remove duplicate libraries during android library collection
Change-Id: Ia6365e15e3ff3ca81ca6935293ce085893f64bbf
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-09-06 13:24:09 +02:00
Alexandru Croitor fb284a3c47 CMake: Tidy up documentation regarding android library collection
Pick-to: 6.3 6.4
Change-Id: I3167855ef3a390a51d7bb0c703f47392b07cb2ac
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2022-09-06 13:24:09 +02:00
Sona Kurazyan a6266810ae Fix compilation with clang
Amends 711105058a and fixes the following
errors:

.../qeglfsx11integration.cpp:28:36: note: non-constexpr constructor
'QBasicAtomicInteger' cannot be used in a constant expression
Q_CONSTINIT static QBasicAtomicInt running;
                                   ^
.../qbasicatomic.h:171:5: note: declared here
    QBasicAtomicInteger() = default;

And:

.../qoffscreenwindow.cpp:171:50: error: 'constinit' specifier missing on
initializing declaration of 'm_windowForWinIdHash' [-Werror,-Wmissing-constinit]
QHash<WId, QOffscreenWindow *> QOffscreenWindow::m_windowForWinIdHash;
                                                 ^
Q_CONSTINIT
.../qoffscreenwindow.h:44:5: note: variable declared constinit here
Q_CONSTINIT static QHash<WId, QOffscreenWindow *> m_windowForWinIdHash;

Change-Id: I991674826737db897e087e9e06b56b338ca61a4f
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
2022-09-06 13:24:01 +02:00
Sona Kurazyan da84941375 QMimeMagicRule: use qOffsetStringArray for storing types
Each element of the array corresponds to an item in QMimeMagicRule::Type
enum, so dropped the last empty string of the array which is not used.

Change-Id: I4786afaa58287c26d4525180fe6fa6891ddcde26
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-09-06 12:57:57 +02:00
Mate Barany aa99bf532d qdbusxml2cpp: modify the behavior of -m/--moc option
qdbusxml2cpp has a -m/--moc option. Change and modify the behavior
such that
-p foo -m includes moc_foo.cpp in the generated .cpp
-p :foo.cpp includes moc_foo.cpp in the generated .cpp
-p foo.h:foo.cpp includes moc_foo.cpp in the generated .cpp

Change the Qt6DbusMacros.cmake file accordingly.

[ChangeLog][qdbusxml2cpp] The -m/--moc option now generates
idiomatic moc file names (moc_base.cpp for headers, base.moc
for implementation files)(was: always base.moc). Build systems
using workarounds for the non-idiomatic naming of moc files
used by qdbusxml2cpp in the past can now drop these workarounds
for Qt versions >= 6.5.

Fixes: QTBUG-103313
Change-Id: I754b1b276f130cb8645166470e1b457a676590f7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-09-06 11:44:22 +02:00
Liang Qi 214953fad6 xcb: fix QXcbCursor build with -DFEATURE_xcb_xlib=OFF -DFEATURE_xlib=OFF
Change-Id: I2a3dbbfe6f7fd8824a64b52ff56d85479e4b428d
Reviewed-by: JiDe Zhang <zhangjide@uniontech.com>
Reviewed-by: Ilya Fedin <fedin-ilja2010@ya.ru>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2022-09-06 11:21:43 +02:00
Liang Qi 012132c60d xcb: use libxcb-cursor to replace Xlib/libXcursor
[ChangeLog][Linux/XCB] Used libxcb-cursor to replace Xlib/libXcursor

Fixes: QTBUG-67373
Change-Id: I04a30e401467e48b431a5cc63984f7b70a09faf0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2022-09-06 11:21:43 +02:00
Eirik Aavitsland e6d3657f7f Update bundled libjpeg-turbo to version 2.1.4
[ChangeLog][Third-Party Code] libjpeg-turbo was updated to version 2.1.4

Pick-to: 6.4 6.2 5.15
Change-Id: Iaffb12606ec53c3ee217b51ad20663aa4409eafa
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2022-09-06 11:21:43 +02:00
Yuhang Zhao d6a36c521e Windows QPA: Don't highlight the first entry of the system menu if not appropriate
Only menu brought up by keyboard should highlight the first entry,
if the system menu is triggered by right clicking the title bar, there
should be no highlighted menu items.

What we do in QWindowsKeyMapper is not temporary changes, the first entry
will always be highlighted unless we unhighlight it manually.

Amends commit 64d65a645c

Pick-to: 6.4
Change-Id: I22c887478fd928264bfa35b9b3a8b67e16a6c649
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2022-09-06 11:49:38 +08:00
Tor Arne Vestbø af4f7fe471 Add QWindowsApplication::setHasBorderInFullScreenDefault() native interface
Allows setting a default for whether the window should have WS_BORDER
when in the full screen window state.

Task-number: QTBUG-104511
Change-Id: Icbda2faf775bf1973a58f7308637c780d3c4bcd4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-09-05 16:29:13 +00:00
Michael Weghorn 5462485a59 a11y atspi: Add null check in GetRowHeader handling
Just like the GetColumnHeader case already does, check
that the cell isn't nullptr before trying to retrieve
the table cell interface from it.

(Not doing so e.g. resulted in a crash with WIP branches
of LibreOffice and Orca to make selected cells with a
child index not fitting into 32 bit work, s.a.
https://bugs.documentfoundation.org/show_bug.cgi?id=150683 )

Pick-to: 6.4 6.3
Change-Id: Idd55fd1f0c49b616c732ddb683814605a46ff319
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-09-05 18:29:12 +02:00
Ievgenii Meshcheriakov 0206283a4b QTlsBackendOpenSSL: Make ensureLibraryLoaded() private
This method is not used outside of the class right now.
This is also an initialization method that may not be
called recursively. Making it private hopefully makes
it harder to make this mistake in the future.

Task-number: QTBUG-103559
Change-Id: I8e1113e442e815320108b79bbd7b41bd28a66840
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-09-05 18:29:12 +02:00
Marc Mutz 8932eee9a6 QOffsetStringArray: fix size_t/qsizetype mismatch
The sizeof operator returns, and both minifyValue and makeStaticString
accept, size_t. Don't funnel it through a qsizetype variable, then,
but maintain it as a size_t all the way.

Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-103533
Change-Id: I05c6a6c5da3d02daabbf1d25a15531c6f44a80ce
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2022-09-05 18:29:11 +02:00
Tang Haixiang 8aae49019d QTextDocumentLayout: Account for topMargin when hit-testing
When TopMargin is set in TextBlock and the mouse click position is
between Margin (the mouse is not on the textrect), the cursor will
usually jump to the end. So topMargin should be considered when
hitTest() calculates coordinates.

Fixes: QTBUG-91774
Pick-to: 6.4 6.3 6.2
Change-Id: I231377263855b9cd7152684203fc4ed2e9299bb9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Tang Haixiang <tanghaixiang@uniontech.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-09-05 16:29:11 +00:00
Mikolaj Boc ff92c4c3d8 Don't attempt to access permissions.request if no such method exists
The font database on WASM attempts to call navigator.permissions.request
which might not exist on certain browsers. Check for undefined before
calling.

Change-Id: I079c8a127339cf6b83bc3f9c3106c752226e5d84
Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2022-09-05 18:29:11 +02:00
Eskil Abrahamsen Blomfeldt 9b6e79abbe Fix crash when setting override cursor on multiple clients
When a client disconnects, we need to disable its client cursor,
otherwise there will be a dangling pointer stored in the
pointer.

In addition, we should reinstate the default cursor only when
all clients have disconnected.

Note: Patch provided in bug report.

[ChangeLog][vnc] Fixed a crash when setting an override
cursor on multiple clients.

Pick-to: 5.15 6.2 6.4
Fixes: QTBUG-105057
Change-Id: I0399087a924c05c8d0811b0ec0305b7857da5d3c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-09-05 18:29:11 +02:00
Marc Mutz a610aeec0e QOffsetStringArray: highlight closing of namespace QtPrivate
... with a comment.

Pick-to: 6.4 6.3 6.2
Change-Id: Iea999e07d95133c4d5941fa7e71d97bfdb179a1c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-09-05 18:29:10 +02:00
Marc Mutz 21c5eeba67 QOffsetStringArray: fix ambiguous qOffsetStringArray overloads
There are two qOffsetStringArray overloads: one in QT_NAMESPACE, the
other in QT_PREPEND_NAMESPACE(QtPrivate). In TUs which use using
namespace QtPrivate, a call to qOffsetStringArray() may become
ambiguous.

Fix by renaming the qOffsetStringArray() to makeOffsetStringArray().

Pick-to: 6.4 6.3 6.2
Change-Id: I242a969f363e230d6a8dfb048601a0c024724f6a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-09-05 18:29:10 +02:00
Lorn Potter 0f80b65a01 wasm: handle cmake's RUNTIME_OUTPUT_DIRECTORY
Also OUTPUT_NAME

Pick-to: 6.4
Fixes: QTBUG-105923
Change-Id: Iaef92b068845d69fad4f73abb7e15dcba3107265
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-09-06 02:29:10 +10:00
Bartlomiej Moskal 76abdaafb5 Android: Light/dark modes detection
After commit: 2248487c6c light/dark mode
detection is supported by Windows and macOS. This commit add similar
implementation on the Android side.

Task-number: QTBUG-83185
Pick-to: 6.4 6.3 6.2
Change-Id: Id1ece98e91a31759b58d651ef62b3715ea25d85f
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-09-05 18:29:09 +02:00
Volker Hilsheimer b05a2768c2 Fix warning from testing assignment
Tests that do

QTRY_VERIFY(a = b);

generate a compiler warning:

using the result of an assignment as a condition without parentheses
[-Wparentheses]: place parentheses around the assignment to silence
this warning

Do that centrally in the QTRY_TIMEOUT_DEBUG_IMPL macro definition.

Pick-to: 6.4
Change-Id: I4a4b0161c4e16c0e1e27a68f33a41efdaa2c962c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-09-03 19:10:42 +02:00
Christian Heimlich 54ea62756a Update zconf.h prefixes to match zlib v1.2.12 update
Historically Qt has used `Z_PREFIX` within zconf.h of its bundled zlib
copy to prefix all zlib symbols with `z_` in order to prevent clashes
with a potential system install of the library when linking statically;
however, v1.2.12 introduced 3 new functions that were erroneously not
accounted for in the upstream repository:

- crc32_combine_gen
- crc32_combine_gen64
- crc32_combine_op

`403020` updated our bundled zlib to this new version and therefore
Qt has inherited this oversight, now clashing with external zlib
builds.

Manually add prefix macro definitions for these three symbols to
restore built-in zlib to its previous clash free state while waiting
for the issue to be addressed upstream.

Pick-to: 6.4 6.3 6.2 5.15
Change-Id: I83f88109a08cf7e7117f1c94b4557a2c36f519c3
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2022-09-03 11:04:20 -04:00
Rafael Roquetto 5d58aee53a tracegen: add support for QSize
Change-Id: I7228f5ebbcbd577a66a7a368fb4d64c4c7e55a25
Reviewed-by: Rafael Roquetto <rafael.roquetto@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-09-03 16:03:29 +10:00
Eirik Aavitsland 8cb78647e3 Windows: avoid losing transparency when pasting images into Qt apps
Before Qt6, we would only request a DIBV5 format image from the
clipboard if that format was available without synthesizing. Then, in
commit 8fa91c75ad that check was believed to be needless, and
removed. However, it turns out that it is needed to avoid loosing
transparency information, so we revert that part and bring back the
check against synthesized DIBV5.

The logic is that some widely used apps will provide images in both
PNG and DIB on the clipboard, and only the former can have an alpha
channel. When we request a synthesized DIBV5 rather than a PNG, it
seems we only get the (opaque) DIB image repackaged as a DIBV5.

On Windows 11, there even seems to be an issue (possibly a Windows
bug) where, after asking for a synthesized DIBV5, the clipboard
contents is somehow changed in a way so that pasting again into other
(non-Qt) apps later will yield a corrupted (pixel-shifted) image. (It
looks like they get a DIBV5 when they expect a DIB). So avoiding
requests for synthesized DIBV5 also avoids triggering that issue.

Also add some logging outout to help future debugging.

Fixes: QTBUG-104872
Fixes: QTBUG-105338
Pick-to: 6.4 6.2
Change-Id: I33ffa2b50870b887a083e9bbb1b2234604e4d8ab
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
2022-09-02 19:22:32 +00:00
Topi Reinio cf3461bab3 Doc: 3rd party: Fix reference to FreeType LICENSE.txt
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: Id5c92938948c636765590e1bee2dd9c2baeb826b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2022-09-02 21:22:32 +02:00
André de la Rocha 3e95884081 Windows QPA: send UIA focus notification after window activation
After a Qt application window was opened, and focus was moved to
another window, and then back to the Qt application window, NVDA
would only announce the window name, but not the widget focused
within the window. This patch makes Qt send a notification focus
for the focused widget after a window activation notification.

Fixes: QTBUG-105735
Pick-to: 6.4 6.3 6.2
Change-Id: I3426b3613ae546de0ce363f9acc5d6776c99a8aa
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2022-09-02 18:31:35 +02:00
Alexandru Croitor 3eb2918f2e CMake: Add reference documentation for QT_IOS_LAUNCH_SCREEN
Amends 578f4ba00c

Pick-to: 6.4
Task-number: QTBUG-104519
Change-Id: I02ea0694ead0e5b8c7a70a09cc14b51d8e374dd5
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-09-02 17:00:23 +02:00
Jens Trillmann b8a9527544 Android A11Y: Check for active surface before calling into native code
This fixes a deadlock. The deadlock occurs on an application state
change. During this state change the QML plugin requests Android to
create a new surface for drawing and waits on the Android thread to
complete the request (QAndroidPlatformOpenGLWindow::eglSurface()).

In the meantime the android a11y delegate gets requests from the
android a11y interface. The delegate tries to access the a11y
information through the native interface, where it has to wait for the
main loop thread to get the a11y information from the QtQuick objects.

This leads to a deadlock in which the main loop thread waits on the
quick rendering thread, the rendering thread waits on the android thread
and the android thread waits on the main loop thread.

This workaround avoids this issue by not calling into native code until
a rendering surface has been created.

Task-number: QTBUG-105958
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: Ib99145aa689d1d62e25d25e1f4f8598d53eee3a9
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-09-02 17:00:23 +02:00
Ievgenii Meshcheriakov 216fe24ca1 QTlsBackendOpenSSL: Use a function-static variable in ensureLibraryLoaded()
Replace a combination of a mutex and a state variable by
a function-local variable initialized by lambda.

C++17 standard guarantees that the lambda is called only once and
that any other callers will waiting for initialization to complete.

The mutex that was replaced is also used in ensureCiphersAndCertsLoaded()
but that seems to be a false sharing.

Task-number: QTBUG-103559
Change-Id: Idb269a24b53cf3812ca9630ab4fc87f99ab16d55
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-09-02 17:00:23 +02:00
Ievgenii Meshcheriakov 1c217ba6f7 TLS backend OpenSSL: Use function-static variable for symbol loading
Replace a combination of a mutex, atomic variable, and another variable
by a function-local variable initialized by lambda.

C++17 standard guarantees that the lambda is called only once and
that any other callers will waiting for initialization to complete.

Task-number: QTBUG-103559
Change-Id: If9af8584e648ddb9ec518498ce035105e52413a2
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-09-02 17:00:23 +02:00
Michael Brüning aed7b5f370 Reland macdeployqt: Don't copy .prl files into the Resources folder
QRegularExpression::isValid returns true on default constructed objects,
so the filter was always matching even though it was not meant to be
applied at all.

Fix this by checking that there is a non-empty pattern string set and
applying the filter only then.

Fixes: QTBUG-87764
Pick-to: 6.4
Change-Id: If37f8abaecacba3dc6f0b14da681a6e025367c10
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-09-02 12:04:23 +02:00
Michael Brüning 60b069471d Correct typo in destination path variable names
A couple of variables contained "Destianation" instead of "Destination"

Change-Id: I98a15652347d1b0dad640bc49925ec296830147b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-09-02 12:04:18 +02:00
Thiago Macieira 84401ae68c QMetaObject/Doc: document the variadic invoke{,Method} and newInstance
Change-Id: Ic6547f8247454b47baa8fffd170dc646d4f73152
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2022-09-01 21:29:04 -03:00
Thiago Macieira 0380dd5051 QMetaObject: pass the QMetaTypes in variadic invoke/newInstance
[ChangeLog][QtCore][Meta Object] QMetaMethod::invoke(),
QMetaObject::invokeMethod(), and QMetaObject::newInstance() are no
longer limited to 10 arguments.

[ChangeLog][QtCore][Meta Object] The use of the Q_ARG macro is no longer
necessary when using QMetaMethod::invoke(), QMetaObject::invokeMethod(),
and QMetaObject::newInstance(). Types may now be passed
directly. Similarly, Q_RETURN_ARG can be replaced by the free function
qReturnArg().

[ChangeLog][Potentially Source-Incompatible Changes]
QMetaMethod::invoke(), QMetaObject::invokeMethod(), and
QMetaObject::newInstance() no longer support passing forward-declared
types in the argument list (it was possible to pass them by
const-ref). From Qt 6.5 onwards, all types in the argument list must be
fully defined.

[ChangeLog][Potentially Source-Incompatible Changes] Attempting to use
the internal types QArgument, QReturnArgument, QGenericArgument, or
QGenericReturnArgument directly with QMetaMethod::invoke(),
QMetaObject::invokeMethod() or QMetaObject::newInstance() may fail to
compile. Those are internal types that were never meant to be used
directly and will be removed in Qt 7. If really necessary, ensure all
arguments passed to those functions are directly using those classes and
not mixed with Q_ARG and Q_RETURN_ARG. Implementations of bindings to
other languages should contact the Qt development mailing list to
discuss options.

Change-Id: I36b24183fbd041179f2ffffd1701e3e8e47e0fba
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-09-01 21:29:04 -03:00
Ilya Fedin ba8c4b4ac6 xcb: set _NET_STARTUP_ID at client leader window
This should help to overcome WM's focus prevention mechanism

Fixes: QTBUG-96276
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: Ic5fb46f7ce54f0df29850725bafa364b74e30d25
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2022-09-02 00:56:58 +04:00