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>
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>
On Wayland there is a special case when decorations are enabled,
where we post an initial update request to ensure widgets are
redrawn after the buffer is recreated (see
af7b60ade5c4be81cbc58eb18307c017d5594071 in qtwayland). To
make sure the test behaves the same on Wayland as on other
platforms, we disable client-side decorations when running
these tests.
The flag is primarily required for the requestUpdate() test
at the moment, but it is only queried once per application
run, so it has to be set before any tests are run.
Pick-to: 6.4
Fixes: QTBUG-100889
Change-Id: Ica6d744083ecae4a3722b6d04b956e7615f0dfe5
Reviewed-by: Inho Lee <inho.lee@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
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>
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>
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>
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>
The initial problem was in server not starting encryption, because
its certificate was rejected by OpenSSL (v3) saying 'weak md'.
After the certificate was replaced, we got another problem - due
to the fixed TLS v.1 protocol for both client and server - handshake
is interrupted early with 'tls v1 alert' and error message
saying about not found signature algorithms. Don't fix the protocol
version, use proper QSsl::SecureProtocols (default).
Pick-to: 6.4 6.3 6.2 5.15
Task-number: QTBUG-106018
Task-number: QTBUG-95123
Change-Id: I0f22f5304f4405933ad511195bc61c640518e7d8
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The certificate was using SHA-1 for signing its certificate, which is
considered 'not good enough' by some TLS libraries.
Regenerate it with SHA-512 and a larger RSA key.
Also include the files needed to generate it.
Pick-to: 6.4 6.3 6.2 5.15
Task-number: QTBUG-106018
Task-number: QTBUG-95123
Change-Id: I535e047d540e663c8cec334695196044173949fc
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
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>
Batching the tests leads to one of the tests tst_qmetaobject and
tst_qmetaobject_compat not being registered in the batch. Attempts to
batch those together fail as batch test name is defined per-source,
which, in this rare case, is the same across the two targets.
Change-Id: I356931feabc004c39ba0b6863b5f64e06d739a58
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The feature does not exist. Do not query for it and assume it's always
off for the purpose of WASM build.
Change-Id: I7e76242c9b3423bfe16872f668c60dae2e74fabe
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
DISABLE_EXCEPTION_CATCHING is added unconditionally on WASM. Add
NO_EXCEPTIONS for all WASM tests since those are never supported.
Change-Id: I2ee10779e7ae0d285494ad650be52dee3099915a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
OpenSSL v3 by default sets SECLEVEL = 2 unless overridden in conf files.
SECLEVEL >= 1 means TLS <= 1.1 is disabled. Remove cases that were
previously expected to work. Arguably, we should not test deprecated
protocols at all, but the cases expecting a failure still work
and logically correct.
Task-number: QTBUG-95123
Task-number: QTBUG-106018
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: Ifa59fa902b433338dbed7abf086cfdef9470384c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
It was an old test written in a very low-level way, which perhaps is ok
to be independent of testlib in a few tests; OTOH, it was blacklisted
on a couple of platforms. Perhaps doing touch events the standard way
could be more stable.
While we're at it:
- verify that the touch events are accepted, and thus verify the new
bool return value from commit()
- implement paintEvent() to help understand the layout, and touchpoint
locations
- remove repeated QCOMPARE lines
- skip the test if window positioning fails
- try to un-blacklist it, on the assumption that window positioning
failure was the reason
Task-number: QTBUG-87025
Task-number: QTBUG-104656
Pick-to: 6.4
Change-Id: Ie22eb24abf95cd849990a56212be87d06ce8e574
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Doris Verria <doris.verria@qt.io>
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>
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>
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>
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>
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>
A couple of variables contained "Destianation" instead of "Destination"
Change-Id: I98a15652347d1b0dad640bc49925ec296830147b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This way it is able to pick up all of the properties assigned to it
before finalization.
Change-Id: I9da635f8620859a669c4e4d589fff56a3ce42ab9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
[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>
This amends 64e6233252.
Automoc complains:
AutoMoc warning
---------------
"SRC:/src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp"
includes the moc file "qgtk3dialoghelpers.moc", but does not contain a Q_OBJECT, Q_GADGET, Q_GADGET_EXPORT, Q_NAMESPACE, Q_NAMESPACE_EXPORT or Q_ENUM_NS macro.
AutoMoc: /home/tjmaciei/src/qt/qt6/qtbase/src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp:0:1: note: No relevant classes found. No output generated.
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: Ic6547f8247454b47baa8fffd170ea8a8ce0ed06c
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Ilya Fedin <fedin-ilja2010@ya.ru>
This is kind of porting missing parts QX11Data::xdndHandleDrop()
in src/gui/kernel/qdnd_x11.cpp in Qt 4.
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: I3a9d657c63dbca43e33262f49484861e60f59b58
Reviewed-by: Liang Qi <liang.qi@qt.io>
Replace hardcoded Qt6 prefix of module tools target when setting
the name of tools package.
Change-Id: Icb6f38cce766c9d32216a65a8a5ce9552d622b72
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The doc of QMetaEnum::valueToKey() says to use ::valueToKeys() instead
for flag types.
Pick-to: 6.4
Change-Id: I48e5ba47324137f2ce2710f1d876e93e7c562e9f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Move the docs types and macros from qlogging.h from qglobal.cpp to
qlogging.cpp. Generate the QtLogging forward header and update the
'\relates' commands accordingly.
Change-Id: I2abaf531b2749ff43909f835efd980e1fc98f278
Task-numer: QTBUG-106154
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Local file system files are difficult to reach on WASM. Build the test
data in so that it's reachable to WASM tests nevertheless.
Change-Id: I65022db7645248d040434759fb60c3076fd65bd8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
A fragment of inline code wasn't wrapped in \c{}.
Doing so made the quotes it was wrapped in redundant.
Documentation of of QSKIP's parameter claimed it does something it
should, but it's up to the client code using it to write a description
that lives up to that.
Pick-to: 6.4
Change-Id: Ib355b9b85c9986f244ae01479134245f182c912c
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
The testlib docs on how to skip whole tests was qmake-specific, so add
the missing details for CMake.
Pick-to: 6.4
Change-Id: I247d08262302dcedb98ffbf301932d6dd84d7ff7
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Applied Q_CONSTINIT to variables with static storage duration, but
skipped the POD types with core constant initializers.
Task-number: QTBUG-100486
Change-Id: Iaabf824e9cb0f29a405a149912200d4e4b3573c1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Add documentation of usage of CBOR in convert and cbordump examples,
add a CBOR overview, and add links to them other places in the
documentation.
Task-number: QTBUG-85912
Change-Id: I518792db63647bf9ddd4507d8d4b7ef056192f82
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Fixes deploying libgcc, currently it fails to change the rpaths with the
following error:
ERROR: Could not parse otool output line:
"\t/usr/local/opt/gcc/lib/gcc/11/libgcc_s.1.1.dylib
(compatibility version 1.0.0, current version 1.1.0, reexport)"
Pick-to: 6.3 6.4
Change-Id: I5c866a375f88e3b222cbdbebc167b04174f753b2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>