Commit Graph

55408 Commits

Author SHA1 Message Date
Marc Mutz
6f5c78fe3d QFlatMap: add remove_if
The existing API of QFlatMap did not allow efficient removal of
elements:

- std::remove_if does not apply, because it works by moving elements
  back in the range onto those that need to be removed, which doesn't
  work in flat_map's case, because, like for all associative
  containers, the key in value_type is const.

- The node-based erase-loop (over it = cond ? c.erase(it) :
  std::next(it)) works, but, unlike in traditional associative
  containers, is quadratic, because flat_map::erase is a linear
  operation.

According to Stepanov's principle of Efficient Computational Basis
(Elements of Programming, Section 1.4), we're therefore missing API.

Add it.

I couldn't make up my mind about the calling convention for the
predicate and, despite having authored a merged paper about erase_if,
can never remember what the predicate is supposed to take, so be fancy
and accept all: (*it), (it.key(), it.value()), (it.key()). This means
that unary predicates can either not be generic or must be properly
constrained to distinguish between pair<const K, V> and K, but that's
not necessarily a bad thing.

There's no reason to supply a Qt-ified removeIf on top of the standard
name, because this is private API and doubling the names would do
nothing except double the testing overhead.

Fixes: QTBUG-100983
Change-Id: I12545058958fc5d620baa770f92193c8de8b2d26
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-03-03 00:25:14 +01:00
Marc Mutz
b2c7f17b94 tst_qflags: don't suppress deprecation warnings
... if there aren't any.

Pick-to: 6.3
Change-Id: I8531e0c1c3ca41d1b1a9d55c9d11782bd63b6f76
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-03-03 00:18:39 +01:00
Sona Kurazyan
e4aa4d4f3d Add compile-time checks for QLatin1String
Change-Id: If1b10a857275fb53c5d0b230bf6d11ce3e1ff2ca
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-03-02 22:22:36 +01:00
Sona Kurazyan
62c7145390 Fix QLatin1String(const char *) constructor to be constexpr
strlen() is not constexpr, use the QByteArrayView's
lengthHelperPointer() instead.

Change-Id: Ie49236edba3306e951402e6b776c15068cac0332
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-03-02 22:22:36 +01:00
Sona Kurazyan
736213bf66 QLatin1String: add missing APIs for compatibility with Qt string views
As a drive-by, fixed misleading wording used in docs.

[ChangeLog][QtCore][Potentially Source-Incompatible Changes][QLatin1String]
Added QLatin1String(std::nullptr_t) constructor, which makes
QLatin1String(0) call ambiguous. To fix the ambiguity, nullptr
must be passed instead of 0.

Task-number: QTBUG-98433
Change-Id: I2b888aa23469343d78aa640dc39a6028b77165dd
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-03-02 22:22:36 +01:00
David Skoland
0e64165c2e Close WASM popups on non-accepted clicks
Generally, all clicks that weren't in a window or weren't handled
should trigger a closing of all popups.

Fixes: QTBUG-90990
Pick-to: 6.3 6.2
Change-Id: I40e6351b265e95e0570e7c5d42f3d5b222538453
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-03-02 22:22:36 +01:00
Giuseppe D'Angelo
44eff8f39f Fix Q_FLAG declaration over enumerations
One should use Q_ENUM, not Q_FLAG, to mark an enumeration.
Q_FLAG should go on the respective flag type.

Change-Id: I16cd5c0d405c3db1951569b72805fdae18898c45
Pick-to: 5.15 6.2 6.3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-03-02 19:45:12 +01:00
Giuseppe D'Angelo
52e523c33f Qt namespace: fix Q_FLAG_NS declaration for Qt::MouseEventFlags
The declaration was accidentally declaring the enumeration as
a flag type, not the actual flag type.

Change-Id: I515478b1628a6d72626da6d7e0061f1ea3d10c89
Pick-to: 6.3 6.2 5.15
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-03-02 19:45:11 +01:00
Alexey Edelev
8b5eb6cd09 Add the missing --no-zstd option to the manual rcc calls
Add the missing --no-zstd argument when generating resource artifacts
using binary or big resources or an existing .qrc file.

Task-number: QTBUG-101353
Change-Id: If930f0cb7ba3c89b21b01552aefd6c0e33fe5cb3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-03-02 17:58:07 +01:00
Eirik Aavitsland
03b9304703 Update bundled libjpeg-turbo to version 2.1.3
[ChangeLog][Third-Party Code] libjpeg-turbo was updated to version 2.1.3

Pick-to: 6.3 6.2 5.15
Change-Id: I69ebd10641b07af324f6ae056cddb65cc0b5ce82
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-03-02 17:58:07 +01:00
Marc Mutz
ea3a7aaf2b QTest: fix QCOMPARE with QT_TYPESAFE_FLAGS
Amends 631a0cc45c.

Pick-to: 6.3
Fixes: QTBUG-101299
Change-Id: Ib17e405de4db9fb592aba4ea842d3768a95cad74
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-03-02 15:38:27 +00:00
Liang Qi
586fd9e034 tests: XFAIL a few in tst_QStaticText on Wayland
Task-number: QTBUG-100982
Pick-to: 6.3 6.2
Change-Id: I18cdb79d9261bac40cc619f9d327d0ef7ed722c4
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-03-02 15:37:33 +01:00
Liang Qi
e49d2daf19 tests: XFAIL tst_QOpenGL::bufferMapRange() on Wayland
Task-number: QTBUG-100918
Pick-to: 6.3 6.2
Change-Id: I1b892a80bcb44e0e4f658ed7073c54900d8a358c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-03-02 15:37:33 +01:00
Liang Qi
2b3d11383e tests: XFAIL tst_QImageReader::setScaledClipRect() SVG/SVGZ
on Wayland

Task-number: QTBUG-100917
Pick-to: 6.3 6.2
Change-Id: I66c42bb0ceca83fd0531159c606d22c58b18b371
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-03-02 15:37:32 +01:00
Tor Arne Vestbø
745893997a macOS: Remove code for handling logical DPI changes
The logical (base) DPI is always 72 on macOS.

Pick-to: 6.3
Change-Id: Ibf9894fdc78d2af2d9949b29dd19ae9e8f2201c7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-03-02 14:58:10 +01:00
Eirik Aavitsland
423b650938 Fix painting clipping glitches with fractional scaling
In QPainter, clipping can only be done on whole pixels. The various
ways of specifying a clipping rectangle to the QPainter API have been
inconsistent in how fractional rectangles (either specified directly,
or as a result of fractional scaling) are mapped (rounded) to integer
coordinates.

Also, the mappings have not made sure to keep the edge-to-edge
property of clip rects under scaling. This is particularly important
when scaling QRegions with multiple rects, as QRegion is designed on
the assumption that an area can be described as a set of edge-to-edge
rects.

The fix rounds a clip rect identically with a fill rect. (Indeed, a
followup plan would be to merge QRasterPaintEngine's
toNormalizedFillRect() with the rectangle rounding function in this
commit).

Notably, a QRectF clip is now interpreted the same as a QPainterPath
clip describing the same area.

This modifies d9cc149995

Task-number: QTBUG-100329
Fixes: QTBUG-95957
Task-number: QTBUG-100343
Pick-to: 6.3
Change-Id: Iaae6464b9b17f8bf3adc69007f6ef8d623bf2c80
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-03-02 13:58:10 +00:00
Robert Löhning
27fae7207f png/ico decoder: Don't try reading beyond the file
This fixes oss-fuzz issue 44955.

Pick-to: 6.2 6.3
Change-Id: Ie74ae037630f83e64fd0678ff2eac579f35d02b8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2022-03-02 14:58:10 +01:00
Samuel Mira
38a86afcc4 Tidy up QTest::FatalSignalHandler
Rename some variables: avoid abbreviated names.
(Don't bother with renaming variables an imminent commit removes, though.)

Pick-to: 6.2 6.3
Change-Id: I3bd11f37ca687047555d43dff83c3c2f935135d8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-03-02 14:58:10 +01:00
Edward Welbourne
fcecaf53f5 Adapt QTest::FatalSignalHandler() to support sa_sigaction when available
We don't currently have a use for the extra parameters, but Samuel
Mira's fix to ensure we don't miss fatal signals on Android needs to
be able to call the prior handler, which may need these parameters.

In the process, check returns from sigaction() and use its nullptr
semantics to query first when detecting whether to restore the default
when done, rather than setting and then restoring if it turns out
we've been replaced in the meantime.

Task-number: QTBUG-97652
Pick-to: 6.2 6.3
Change-Id: If30a0db35946c3dceb409ae3f41aa437149472e6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-03-02 14:58:10 +01:00
Mårten Nordheim
6782a37bb5 Gradle: Update to 7.4
Pick-to: 6.3
Fixes: QTBUG-100989
Change-Id: I7978afc18a51b58ea95e4fb94328c4f98bb12486
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-03-02 14:55:01 +01:00
Eike Ziller
745c1f584d MIME providers: Make provider implementations final
We do not derive from them, and making QMimeXMLProvider final
avoids a warning about calling a virtual function from the
constructor.

Change-Id: I565c63eb555fabb3c98e7d284b54037b7a7194da
Reviewed-by: David Faure <david.faure@kdab.com>
2022-03-02 14:55:01 +01:00
Andreas Buhr
5a8052f9c1 Activate tst_qxmlstream for Android
tst_qxmlstream was disabled because it crashed. It does not any more.
But it extracted an input zip archive in-place, which is not
possible on Android. To resolve this, input files are
copied to a temporary directory first.
Also, input directories were given to rcc. rcc has a problem
with recursive directories. To circumvent this,
the file list is created in CMake and then given to rcc.

Task-number: QTBUG-87671
Pick-to: 6.2 6.3
Change-Id: I88bb823b9e5c085404e263d4a648d65c9cd6024c
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-03-02 14:55:00 +01:00
Pasi Petäjäjärvi
f8f8c38ec7 CI: Blacklist systemFixedFont for QNX
QNX tests are run under QEMU so have the same problem as b2qt

Pick-to: 6.2 6.3
Task-number: QTBUG-100948
Change-Id: I2abc8a4bca9e8ba414197721301d493296e7ce0b
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-03-02 15:27:36 +02:00
Ivan Solovev
e5c23db60c Android: temporary skip tst_QDialog::dialogInGraphicsView
This test crashed and prevents other testcases from execution.
The test requires a proper fix, but that's not trivial, so skipping
to enable more tests in the CI for now.

Task-number: QTBUG-101321
Pick-to: 6.3 6.2
Change-Id: I1bd4b1182cc868a36391a718457eae647675fc17
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
2022-03-02 12:14:26 +01:00
Ivan Solovev
ef22545184 Android: skip tst_QDialog::snapToDefaultButton
This test uses the cursor. However we have no cursor support on Android.
Skip the test instead of blacklisting it, because that is the correct
behavior.

Fixes: QTBUG-87389
Pick-to: 6.3 6.2
Change-Id: I1a2d2dd406b3d7da1bc70b51c2072a83d9a29ca5
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
2022-03-02 12:14:26 +01:00
Øystein Heskestad
88dedfee1c Revert "Add new third party SHA-3 implementation to replace old obsolete one"
This reverts commit c6958cbbd6.

Reason for revert: This implementation cannot generate digest noexcept, which is required by the QCryptographicHash API.

Change-Id: Iaf635d2738be378aa769b4631685163ba73c26e1
Task-number: QTBUG-71327
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-03-02 11:14:26 +00:00
Ivan Solovev
6e9a3d4209 QSettings: support reading UTF-8 keys in INI files
[ChangeLog][QtCore][QSettings] The INI file reader now supports
keys encoded with UTF-8, as well as the %-encoded format. Writing
the keys back to the INI file is still done using %-encoded format.
This change does not touch the way the *values* are handled - they
are both read and written in UTF-8.

Drive-by: remove misleading comments from the reading algorithm.

Task-number: QTBUG-99401
Change-Id: I6a83cbf24d919a499540403688615f93cb195e93
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-03-02 11:13:33 +01:00
Kai Köhne
dfe6601974 Bootstrap: Make compiler warnings fatal
Prevent compiler warnings from creeping into the bootstrap library.

Pick-to: 6.3
Change-Id: I8054416564c91fee256cad616911dd4ad231d0df
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-03-02 11:03:44 +01:00
Fabian Kosmale
ef0e13257d QMetaObjectBuilder: Always set Data::metatypes
The array of metatypes should always contain at least one entry (for the
metatype of the current metaobject itself).
This prevents crashes in the case of a metaobject without meta-methods
and properties (as observed in Qt for Python).

Pick-to: 6.2 6.3
Change-Id: I7a6fb316eea48c4852b6f1c26e0a930aeba4c799
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2022-03-02 10:43:49 +01:00
Eike Ziller
9d4e6d560a QMimeMagicRule: Fix missing check and return for "Invalid" type
In the QMimeMagicRule constructor.

Change-Id: Icdd1c4bc0e8d7cc39c8f63b416deec84b2607c96
Reviewed-by: David Faure <david.faure@kdab.com>
2022-03-02 10:43:49 +01:00
Alexey Edelev
e7586119e1 Add the _qt_internal_android_executable_finalizer wrapper function
_qt_internal_android_executable_finalizer wraps Android-related
function that are needed to created an Android package.
The function is added to the INTERFACE_QT_EXECUTABLE_FINALIZERS
property in Qt Core so it's called implicitly for user projects.

Pick-to: 6.3
Change-Id: I140f53341691dcfdc6ae2ddea520818cf2834eb6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-03-02 10:23:54 +01:00
Samuel Mira
fef455999a Android: Fix issue in loading multimedia Android plugin
Qt projects on Android were failing to correctly load the plugin lib.
The main reason is missing environment variables when the media
integration starts. To make sure that the variables are loaded, I have
change the setenv to be done in the java side instead of c++ side.

Fixes: QTBUG-100299
Pick-to: 6.3
Change-Id: Iba0b6af40574be2d88824ebdcfb1626335cecf09
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-03-02 11:23:54 +02:00
Øystein Heskestad
18f3867827 Revert "Change third party SHA-3 implementation to use"
This reverts commit 6deded8bc4.

Reason for revert: The new SHA-3 implementation cannot generate digest noexcept, which is required by the QCryptographicHash API.

Task-number: QTBUG-71327
Change-Id: I9a49acd529090d479c7d5e9583dd25e0ec669806
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2022-03-01 12:32:39 +01:00
Liang Qi
cfc2e267a4 xcb: fix a typo for WindowTypes
Pick-to: 6.3 6.2 5.15
Fixes: QTBUG-101306
Change-Id: If02fe4997d27b952886ce664133d1aafc2b41669
Reviewed-by: Liang Qi <liang.qi@qt.io>
2022-03-01 07:38:20 +00:00
Yuhang Zhao
540745e599 Windows QPA: Add convenient overload to query window frame
To be used in a later commit.

As a drive-by, return early in the frameOnPrimaryScreen
overload to avoid calling GetWindowLong in cases we
don't need them.

Pick-to: 6.3 6.2
Change-Id: Ia69f4acbbf3e044073f818f357e614d4c6680d21
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
2022-03-01 13:08:03 +08:00
Yuhang Zhao
77d0ad6657 Windows QPA: Add some offset to the system menu when appropriate
Before this patch, the system menu will always appear on
the top-left corner of the window if the window doesn't
have the standard window frame. However, this doesn't look
very good on most situations, especially when the window
has a homemade title bar. This patch adds an extra check
for this kind of situations. This patch will automatically
apply an appropriate offset for the system menu if the user
is trying to use a self-made title bar for their frameless
or customized windows.

Pick-to: 6.3 6.2
Change-Id: I55e1c4ac26a4051ca48928d4a2ac3456dce117d1
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
2022-03-01 13:08:02 +08:00
Yuhang Zhao
7261c81152 Windows QPA: fix window style correction for context help button
According to Microsoft Docs [1][2], WS_MINIMIZEBOX and WS_MAXIMIZEBOX
must be accompanied by the WS_SYSMENU style, and the WS_EX_CONTEXTHELP
style is not compatible with WS_MINIMIZEBOX and WS_MAXIMIZEBOX. This
patch adds additional checks for these situations.

[1] https://docs.microsoft.com/en-us/windows/win32/winmsg/window-styles
[2] https://docs.microsoft.com/en-us/windows/win32/winmsg/extended-window-styles

Pick-to: 6.3 6.2
Change-Id: If32f8b42e25cfc67ffd1e84cc4b061f21a01042a
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
2022-03-01 12:29:36 +08:00
Yuhang Zhao
770ea68588 Windows QPA: Use less magic number
The correct calculation of the invisible frame margin and the window
border width (they are the same thing actually) is the thickness
of the size frame plus the thickness of the padded border. When
DPI is 96, both of them is 4px and thus the invisible frame margin
and window border width is 8px. So previously the empirical
magic number can work normally is because the error is very small.
It's not a big thing because even on a high DPI screen the error
is still very small. For example, on my 4K monitor with 200%
scaling, the error is only 2px, human eyes almost can't find the
visual difference. But since we now know how to calculate these
values correctly, let's use the correct calculation instead. The
magic numbers and empirical expressions just make people confused.

Pick-to: 6.3 6.2
Change-Id: Ieda4796231935f2ad1b6f28e4aa4af5b5bce2256
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
2022-03-01 09:11:51 +08:00
Giuseppe D'Angelo
9c947c131d QLabel: remove some dynamic allocations
QLabelPrivate uses pointers and dynamically allocated objects as a form
of optional. To add insult to injury, the objects are implictly shared,
compounding the effects in terms of required allocations.

Just use std::optional instead.

Change-Id: Ica582dc0d2a9ab56f45ce305290541383b7ddeef
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2022-03-01 01:55:08 +01:00
Iikka Eklund
bec3c2a335 Conan: Include Android specific option values in 'package_id'
The Android specific option values need to be included in the
'package_id' to avoid mixing Android binaries built with
different Android sdk, ndk, abis etc.

The 'android_ndk' path can not be used as the option value as such
because this is a local file system path that may be different
on each system. This would make the pre-built binaries unusable
as the value is part of the 'package_id' checksum.

Instead, parse the 'Pkg.Revision' from the 'source.properties'
file pointed by the original 'android_ndk' option value and
use this as the 'android_ndk' option value for the 'package_id'.

The 'QT_ANDROID_API_VERSION' can be used for 'android_sdk' value
for package_id if passed as cmake argument. If not then
currently we need to remove the 'android_sdk' from package_id
calculation as we don't have clear means to query that from
the build system. This should hopefully be fixed in future
releases.

Pick-to: 6.2 6.3
Task-number: QTQAINFRA-4646
Change-Id: I679fbdcf92a1d93e00685215bb011948f1aba71f
Reviewed-by: Toni Saario <toni.saario@qt.io>
2022-03-01 00:01:04 +00:00
Liang Qi
404c5dc49f xcb: free a randr monitors pointer after usage
This amends 9a4c98e556.

Pick-to: 6.3
Fixes: QTBUG-101302
Change-Id: Ia7a2f82550843a90a5e101788e3835bf3332f697
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-02-28 23:44:15 +01:00
Marc Mutz
e1b8257dee tst_qflags: compile with QT_TYPESAFE_FLAGS
In constExpr(), where code incorrectly assumed conversions to int or
uint were implicit, make them explicit.

In classEnum(), don't test bitwise operators between QFlags and
int/uint when QT_TYPESAFE_FLAGS is in effect.

Pick-to: 6.3
Fixes: QTBUG-101294
Change-Id: If119bf56dd12778f7231a9e76293c76e75354809
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-02-28 22:09:31 +00:00
Marc Mutz
6f50e54138 QFlags: fix missing bitwise xor operators in QT_TYPESAFE_FLAGS builds
Add tests that cover them.

Pick-to: 6.3
Fixes: QTBUG-101300
Change-Id: I5a8af4a91d796cc4d287b813bd5cc13da3d7e766
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-02-28 23:09:31 +01:00
Andreas Buhr
324887779d Activate tst_qmenu for Android
tst_qmenu was disabled because it crashed.
It does not any more.

Task-number: QTBUG-87671
Task-number: QTBUG-87424
Pick-to: 6.2 6.3
Change-Id: I1a3a1d2861b5a8f20d83fd8ba38fdcb3c88faee9
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-02-28 23:08:21 +01:00
Andreas Buhr
a1b90caad5 Activate tst_qfiledialog for Android
tst_qfiledialog was disabled because it crashed. It does not any more.

Task-number: QTBUG-87671
Task-number: QTBUG-101194
Pick-to: 6.2 6.3
Change-Id: Icfda2cd01677f3a076b74429fcf66a1de79d2aa9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-02-28 23:08:21 +01:00
Alexandru Croitor
8b5648743e CMake: Clean up docs of deployment variables for 6.3
Clarified the docs that using the deployment variables is for avoiding
hard-coding of specific paths.
Added docs on how to customize the variable defaults
Added example doc snippet demonstrating how to modify the values.
Added upstream doc links where relevant.

Pick-to: 6.3
Fixes: QTBUG-100924
Change-Id: I938dcadd776c8b7019da4709dfced166454a6c92
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2022-02-28 23:08:21 +01:00
Pasi Petäjäjärvi
d0d1d74033 Fix check for IPV6 support without certain features
Without features getifaddrs and ipv6ifname we cannot
get correct IPV6 information for interfaces.

Pick-to: 6.2 6.3
Change-Id: I7f8c4e68d345160d218fde8db640440f3324014e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-02-28 22:08:21 +00:00
Ivan Solovev
e37919b758 Android: fix tst_QFrame::testPainting
When we create a QPixmap using QWidget::grab(), a default system
image format is used for that.
On Android this format is ARGB32_Premultiplied, while on the desktop
systems it is RGB32.
The images that are saved in the resources and used as references, also
have the RGB32 format.
As a result, on Android we need to convert the pixmap to a proper format
before comparing it to the reference.

Fixes: QTBUG-69064
Pick-to: 6.3 6.2
Change-Id: I2d881e508d34e0b1a2a1a7bffcbc71ae2907d31d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
2022-02-28 23:08:20 +01:00
Alexandru Croitor
34a4fe0166 CMake: Rename FindZSTD to FindWrapZSTD
And the target ZSTD::ZSTD to WrapZSTD::WrapZSTD.
This should allow building Qt with the
-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON set.

Pick-to: 6.2 6.3
Fixes: QTBUG-100537
Change-Id: I748601e4ad6f518323bf1034d6fc1de582c815e1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-02-28 23:08:20 +01:00
Alexandru Croitor
0ada264dda CMake: Clean up qt_deploy_runtime_dependencies for 6.3
Ensure both versioned and versionless functions
are available.

Use the versioned function in the implementation of
qt6_generate_deploy_app_script.

Move the low-level warning to the top of the documentation page,
after the TP message.

Clarify documentation of the EXECUTABLE and
ADDITIONAL_ options, that they take relative paths and can use
generator expressions, but can't reference raw target names.

Adjust documentation snippet to cover mac / windows cases.
This mostly coincides with the internal implementation of
qt_generate_deploy_app_script.
Also adjust it to show case more options, like installation of a
helper app and its dependencies.

Output the working directory when executing the deploy tool.

Remove the MACOS_BUNDLE option, it serves no good purpose at the
moment, we already detect bundles by checking if the dir name has
an '.app' suffix.

Pick-to: 6.3
Fixes: QTBUG-100923
Change-Id: If7e5d65ce920eb69fd45f004aa4c5bad800c7ba9
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-02-28 23:08:20 +01:00