Commit Graph

56292 Commits

Author SHA1 Message Date
Ivan Solovev
7c9b4f86b6 Android: activate tst_QPluginLoader
- Use QT_ANDROID_EXTRA_LIBS to correctly deploy libraries on Android.
- Update the test code to use application libraries directory
  on Android.

This allows to enable the test for Android in CMakeLists.txt

Task-number: QTBUG-87438
Pick-to: 6.3 6.2
Change-Id: Ib74da036472320736888052b63a45ca50431de48
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-03-30 19:05:59 +02:00
Ivan Solovev
ed6fe5abc8 Android: activate tst_QLibrary
On Android we demand the libraries to always start with "lib" and
end with ".so" extension. Also Android does not support versioned
libraries.

This patch updates CMakeLists.txt to fulfill these requirements,
and also omits some unsupported test cases.

This allows to enable this test for Android in CMakeLists.txt

Task-number: QTBUG-87438
Pick-to: 6.3 6.2
Change-Id: Iec30acdefe00c471acc7139cd255b3389e31d22b
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-03-30 19:05:59 +02:00
Tasuku Suzuki
5cbb93adc7 configure: Add mold to help
Pick-to: 6.2 6.3
Task-number: QTBUG-99270
Change-Id: I08ee2b328a1dba2bf0172e5a03ddb32925401d3b
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-03-31 01:22:02 +09:00
Pasi Petäjäjärvi
ece174c50f CI: Increase QNX qemu startup timeout
For some reason starting of qemu randomly fails in the given timeout.
Set it to reasonably large amount so that we can rule out issues with
qemu itself. Also increase script timeout less than what coin gives
for the script to run se we should see if script bails out and is not
stuck.

Pick-to: 6.2 6.3
Change-Id: I37c7ec636f154955c6472d5e9d0fa92bb5bb457f
Reviewed-by: Toni Saario <toni.saario@qt.io>
2022-03-30 08:42:52 +00:00
Tor Arne Vestbø
344e0e7141 Revert "Avoid populating font family aliases if family matched"
This reverts commit 69d525a6fa.

The change introduced behavior changes on Windows, where family
aliases are used to build a full set of styles for a family.

Change-Id: I64ca1cf5febf0a6277cbe0a0041ccdb76da72196
Pick-to: 6.3 6.2 5.15
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-03-29 23:26:37 +00:00
Samuli Piippo
9a74d94ff5 Coin: use CMAKE_STAGING_PREFIX for cross-compilations
Re-apply 9a9b253b68 to use
CMAKE_STAGING_PREFIX in cross-compilation builds.

Amends b7986a8f6e9df3727f433a0df0ba56a3355153d0.

Fixes: QTBUG-102108
Pick-to: 6.3
Change-Id: I8875da2df1427f02be68dd737168d76a8dc4ed2a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-03-29 21:12:13 +00:00
Edward Welbourne
0bdc7322d9 Tidy up QTapTestLogger::addIncident()'s regex parsing
It had some repetition that could be refactored out, some long lines
and a bool it worked out the hard way, when it had previously
determined the answer in passing without recording it.

Change-Id: I9e53ed087dfbe8067686b27b6cf9ac32040fbf19
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-03-29 22:21:58 +02:00
Edward Welbourne
784f5d76b9 TAP test logger: report B?XFAIL (mostly) as a message
Previously, only the first B?XFAIL would be reported, all others would
be discarded. Furthermore, if a B?XFAIL had happened, B?PASS was also
not reported, since the B?XFAIL served as test line. However, if the
B?XFAIL was followed by a SKIP, B?XPASS or B?FAIL, these were reported
as normal, producing exactly the kind of duplicated test line that the
skipping of B?PASS was meant to supply.

So change B?XFAIL to be reported among the messages, but retain the
TODO annotation of the first on the test line of a subsequent B?PASS,
if nothing more drastic happens in the mean time. So now more than one
B?XFAIL can be reported, the test is still marked as a TODO and we
don't get duplicate test lines for a subsequent non-passing result.

This replaces the bool m_wasExpectedFail member with a QTestCharBuffer
m_firstExpectedFail that records the first XFAIL's TODO line (so its
isEmpty() fully replaces m_wasExpectedFail).

Previously, the at/file/line information for a B?XFail would be
supplied as top-level keys in the YAML block for a "Pass" reported as
not ok due to the XFail, as this location information is now part of
the B?XFail's message in the extensions/messages block. Duplicating
the first B?XFail's location at top level would add complexity and is
arguably misleading, as the test result is really a pass (after
ignoring known issues), and the location of the pass is indeterminate
(nominally the end of the test function, but actually also after the
cleanup() call for this test, when relevant), which is why a Pass has
no location information.

Task-number: QTBUG-96844
Change-Id: Ib3f24f56266ff49bf3bc9759ac8263ac69a62130
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-03-29 22:21:58 +02:00
Edward Welbourne
ac38401d31 Move TAP's messages block to after the primary report details
In the process, split it from its comments block and don't bother with
a YAML block if it would only have contained comments.

Task-number: QTBUG-96844
Change-Id: I08c20f796252bb270ba9caa4c055cdcc0843a88b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-03-29 22:21:58 +02:00
Edward Welbourne
299186602a Add a test and remove a work-around for a fixed bug
The ASN.1 parser for a date-time had to check the date-time string was
all digits to catch the case of a sign in the month field, which used
to be accepted when it should not be. That bug has now been fixed, so
remove the work-around and add a second date-time test-case, renaming
(and modernising) the existing one for consistency.

Task-number: QTBUG-84349
Change-Id: I649c5129312b6865af08b22ba6893cb4e29243f8
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2022-03-29 22:21:57 +02:00
Doris Verria
1b6874034a Implement QPlatformTheme::appearance() for iOS
Implement support for detecting Light/Dark mode on iOS. This is needed
by the QQuickIOSStyle in order to display the proper image assets
according to the theme.

A further improvement would be to react to theme changes dynamically.

Change-Id: I95e11c4a4b647614bdd78d734941d2b11546687a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-03-29 18:10:37 +00:00
Laszlo Agocs
a86ee60887 Fix heap-use-after-free with rhi-based backingstore
Task-number: QTBUG-102030
Change-Id: I6b05007c6ae3d653197c5680b9fc5768b0e3690f
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
2022-03-29 17:53:24 +02:00
Laszlo Agocs
7e4c2ac711 Query the QWindow in every test iteration in qWFWExposed(QWidget)
Task-number: QTBUG-102030
Change-Id: Ic8aee76570a000709b480ffbe19335518e3f7a7e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-03-29 17:53:24 +02:00
Laszlo Agocs
2ca50df11c Fix up some QMatrix4x4 docs
The deprecation note for one of the operator* is wrong: Using
mapVector() is never the right choice given the deprecated operator*
itself is implemented by calling map(). It could be that in some cases
the results are identical so one can get away with migrating to
mapVector(), but this is incorrect in other cases and causes
regressions all over the place. Thus we should only recommend using
map() instead, never mapVector(). As shown by recent experiences, the
current docs are insufficient/wrong and caused a number of regressions
in the Qt code base as well.

Also enhance some related docs. It could be that the wording is not
always academically correct, however having some additional notes in
there help make it obvious to the reader (or at least raise some
alarms) that there are important differences between map and
mapVector.

Also improve the note for the other deprecated operator*. There is
only one way to convert to a vec4, given the existing implementation
of the operator, and that is by using 1 for w. Make this clear to the
reader.

Pick-to: 6.3 6.2
Change-Id: I1d8dbca44fdc103ab62d49bfc1d4ce37a9bc130b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2022-03-29 16:53:24 +01:00
Mårten Nordheim
4c4afb6e8d qfilesystemengine_win: Fix compilation with namespaces
The original using is outside QT_NAMESPACE, so it is
not correctly picked up by various parts of the code.
Simply moving it inside QT_(BEGIN|END)_NAMESPACE revealed
that the namespace (and thus scope) is closed and re-opened.
in the file, so fix that too.

Change-Id: I704f164b5705b539dbdf25b7743f5e339c016600
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2022-03-29 14:34:57 +00:00
Tor Arne Vestbø
a1d74b0618 Update mapping between Apple Clang versions and upstream Clang
We can not trust __clang_major__ and __clang_minor__ for Apple Clang,
but we still want a single Q_CC_CLANG define that can be used to check
the Clang version.

Pick-to: 6.3 6.2
Fixes: QTBUG-99020
Change-Id: I5128c1ff40d1ef1afeaab3c7fa4988a5bb170742
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2022-03-29 13:35:24 +00:00
Joerg Bornemann
60c70e4eff Doc: Document QT_NO_[SIGNALS_SLOTS_]KEYWORDS defines
Pick-to: 6.2 6.3
Fixes: QTBUG-70564
Change-Id: I8ed1a30567dabdcb95cdfce009f1d9e0645d3226
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-03-29 14:56:15 +02:00
Joerg Bornemann
845d28cafb qmake: Ignore stderr when determining the macOS SDK version
If xcrun prints warnings or errors to stderr while determining the SDK
version, they become part of the SDK version string.  This then leads to
a qmake error.

Intentionally ignore stderr so that it is not treated as part of the SDK
version.

Pick-to: 5.15 6.2 6.3
Fixes: QTBUG-102066
Change-Id: I023296b430aac1407c970412c5cf1010bd81589b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-03-29 14:56:15 +02:00
Friedemann Kleint
0cdb44f01f Windows: Fix potential crash when retrieving default printer
GetDefaultPrinter() has been observed to return size == 0.

Pick-to: 6.3 6.2 5.15
Fixes: QTBUG-53290
Change-Id: Id4c7a06d14d368c792e15e55cacf2366b6aedc7b
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2022-03-29 13:56:14 +01:00
Ivan Solovev
d85c6527b5 Android: fix fullscreen handling
Commit a35a7fcb5a introduced the usage
of insets to correctly take into account the default Android status bars
and other reserved regions.

However in practice that does not work as expected - the bottom inset
is always reported to be non-zero, even when fullscreen mode is enabled.
To fix the issue, FLAG_FULLSCREEN is explicitly checked before applying
the insets.

Fixes: QTBUG-99624
Pick-to: 6.3 6.2
Change-Id: I8b25f0b06447cd452c42ef072493e3137e25f38b
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-03-29 13:56:14 +01:00
Ivan Solovev
3033d89674 Android: activate tst_QWidget
Fix some obvious issues, QSKIP or blacklist other problems.
This does not fix all the test failures, but allows to enable most of
the test cases, so that we could catch future regressions.

Task-number: QTBUG-87668
Pick-to: 6.3 6.2
Change-Id: I1ed0b476d4ac55c658c572cfa1379fcdc6137ee8
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-03-29 13:56:14 +01:00
Ivan Solovev
3c5b3a36af Introduce QTestPrivate::androidCompatibleShow() helper function
This function should be used in QWidget-related test cases instead of
QWidget::show() when you need to move or resize the widget and then
compare its position or geometry with the expected value.
The reason for introducing it is that on Android QWidget::show() is
showing the widget maximized by default, so its position and size
can't be changed.

Task-number: QTBUG-87668
Pick-to: 6.3 6.2
Change-Id: I8ec5c07b73968b98d924a41e5d41ddb4d7be1ced
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-03-29 13:56:14 +01:00
Ivan Solovev
2a893db480 Android: enable tst_QLocale
Do not try to properly specify a path to an external syslocale app,
because the related test can't be executed on Android anyway.
This fixes a failure in initTestCase() and allows to unblock other
test-cases.
Also skip systemLocale() test, because Android platform plugin already
creates a custom QSystemLocale instance, so a hack with MySystemLocale
does not work.

As a drive-by: simplify the #ifery in initTestCase() and remove an
unused second parameter of QSKIP() in emptyCtor_data().

Fixes: QTBUG-87414
Pick-to: 6.3 6.2
Change-Id: Iefc587062362469856fdca77f9ec9d96f5552e45
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-03-29 13:56:14 +01:00
Alexandru Croitor
939a8281e6 CMake: Fix picking of the binary_for_strip project location
Fix binary_for_strip project not being found when the following
conditions were met:
- building a repo other than qtbase
- qtbase sources are not available on the machine
(usually happens in CI where only the current repo sources are
available).

The issue was that QT_CMAKE_DIR would always be defined, regardless of
which repo was being built and the system would incorrectly assume
the location of the project files.

The fix is to always pick up the sources from qtbase's source dir if
they are available (this time done with an appropriate check),
otherwise use the installed files.

Note that the behavior of always using the qtbase sources if available
is not exactly the best, but it is a more general issue that affects
other code too.
In the name of consistency, make it so for the binary_for_strip
project as well, but add TODOs in code to address the situation
in a separate change.

Amends 39f657032b

Pick-to: 6.2 6.3
Fixes: QTBUG-102064
Task-number: QTBUG-88090
Task-number: QTBUG-101653
Change-Id: I0649f945e9ff0ab1f597c51bb5ab389fa665c021
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-03-29 14:56:14 +02:00
Morten Johan Sørvig
942de89562 Fix high-dpi and QScreen state initialization
Fix bug where QScreen::geometry() returns incorrect
(unscaled) geometry.

We maintain state:

  - QHighDpiScaling::m_active, which is set to true
    if any screen in QGuiApplication::screens() has a
    scale factor > 1, in updateHighDpiScaling()
  - QScreen::m_geometry, which is assigned the scaled
    screen size in QScreenPrivate::updateHighDpi()

Now the problem is that updateHighDpiScaling() requires
an up-to date screens list, and that updateHighDpi()
requires an up-to date m_active, and that currently
updateHighDpi() is called when constructing the QScreen
only.

This is all a bit unsatisfactory, but for now fix this
in the simplest way by adding a second call to
updateHighDpi() in handleScreenAdded(), after the call
to updateHighDpiScaling().

Pick-to: 6.2 6.3
Fixes-number: QTBUG-101601
Change-Id: I5f442ceb966c77d6746ee885203b67da96612587
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-03-29 12:35:50 +00:00
Marc Mutz
32692667a6 Apply Q_CONSTINIT across the codebase
Still not complete. Just grepping for static and thread_local.

Task-number: QTBUG-100486
Change-Id: I90ca14e8db3a95590ecde5f89924cf6fcc9755a3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-03-29 06:18:49 +01:00
Ivan Solovev
9578a3f72f QFileSystemWatcher: Blacklist failing tests on macOS arm
The tests started failing for some reason, so blacklist them to
unblock the CI.

Task-number: QTBUG-102095
Task-number: QTBUG-102096
Change-Id: I3e0667581bb1a9fd08dedcdab08878b1f738ac92
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-03-29 00:39:20 +00:00
Christophe Giboudeaux
8924cc13be CMake: Don't hardcode the library directory name
Using INSTALL_LIBDIR is the only reliable way to get the library install directory.

Amends: d1c56073b4

Pick-to: 6.2 6.3
Change-Id: Ib8c4fb8b4d339c63209393d7fdb3d1c3425b03a4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-03-29 00:16:54 +01:00
Edward Welbourne
7d60fde9a7 Include file and line information in TAP diagnostics blocks
When producing a diagnostics block, include the file and line
information, if we have it, to describe it. This presently only adds
this information for skip, but could in principle do the same for a
B?XPass.

Task-number: QTBUG-96844
Change-Id: I6cc375d98e2369eba262010f9c2dfbcba931a6f1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-03-29 00:05:12 +01:00
Edward Welbourne
ae37fa0464 TAP test logger: move messages into the diagnostics block
Our TAP output was delivering messages as comments before the test
line, where TAP clearly expects the details of a test to follow its
test line. Version 13 provides a YAML block to deliver diagnostics and
encourages use of this, so accumulate our messages in a
QTestCharBuffer instead of emitting them one by one.

However, messages produced after a test has produced its test line
belong to that test, but are too late to be included in its
diagnostics block, so should be emitted immediately as before, albeit
now with a type prefix. This at least separates such messages, from
the end of one test, from messages produced early in the next.

In the process, add a type-prefix to each, to make clear what type of
message it was. Since the Yamlish supported by TAP consumers doesn't
support a way to have many messages, use the extensions: top-level
hash tag with a messages: sub-tag to gather our messages as a list.
(This expands at least one expected output file significantly and
substantially rewrites some others.)

Add methods to QTestCharBuffer, and a helper function, to support this.

Task-number: QTBUG-96844
Change-Id: If44a33da5879ed1670ef0980042599afd516f9d2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-03-29 00:05:12 +01:00
Ivan Solovev
d329a98fa9 Android: re-enable skipped tests
Now when 71b3d18ea7 is merged,
we can re-enable the previously skipped tests, as they do
not crash anymore.

Task-number: QTBUG-101423
Task-number: QTBUG-101321
Task-number: QTBUG-87417
Pick-to: 6.3 6.2
Change-Id: I6b4b3619b0af5e48b5e92b514bc0ab6586a76d51
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-03-29 00:01:30 +02:00
Mike Achtelik
c6f323f4d4 iOS A11Y: Do not add children of invisible parent
Prevent children from invisible parents from showing up in the a11y
hierarchy. This fixes a problem on iOS which e.g. always adds hyperlink
children of QML Text items, even if the Item itself is invisible.

Pick-to: 6.3 6.2
Change-Id: I88a6f08956b5fe78cb789a08f2078f96d7aa263c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-03-28 22:22:31 +02:00
Sze Howe Koh
f32e28db18 QTableView: Document the customizations applied to QHeaderView
These are non-default options which the user needs to manually set when
applying a custom QHeaderView.

Task-number: QTBUG-102034
Pick-to: 6.3 6.2 5.15
Change-Id: Ib3396f0a82c358c71a8501fc2d71158f725bc228
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2022-03-29 03:05:23 +08:00
Timur Pocheptsov
040643043b TLS backend (OpenSSL): add warning message
To make a failure to load libssl or libcrypto more obvious (so that,
for example, failing auto-tests are immediately correctly diagnosed).

Pick-to: 6.3 6.2
Change-Id: I2b1874cc6a04005d286382bb9cd28ee3681aa4e4
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-03-28 21:05:22 +02:00
Mike Achtelik
ec4c6e0acb Android A11Y: Add supported role infos to A11yNodeInfo
This allows the screen reader to pick up on them and give additional
info e.g. that text links which are now added automatically since
QTBUG-67878 are clickable.

Pick-to: 6.3 6.2 5.15
Change-Id: I96d8dd628d10b26b4c9ffee15dfa01a9abef61b1
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-03-28 20:05:22 +01:00
Ivan Solovev
9a4c32cedd Android: unblacklist tst_QStringConverter::convertUtf8()
The test was failing because test data was not provided correctly.
That was fixed in 4aea86f5e8 but the
test was never unblacklisted.

Fixes: QTBUG-87418
Pick-to: 6.3 6.2
Change-Id: Ibef7dcfaf59ef50f90d6538a562d03af17f065e0
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-03-28 08:52:31 +01:00
Alexey Edelev
f641dfe451 Fix the support of genex's when generating Android deployment settings
Add GENEX_EVAL when proxying target properties that needs to be written
to Android deployment settings.
If properties that are proxied in the
_qt_internal_android_format_deployment_paths function contain genex's
they are not evaluated when file(GENERATE is called. So the resulting
Android deployment settings contain unevaluated generator expressions
but not the values of the corresponding properties. Generator
expressions like TARGET_FILE or TARGET_FILE_DIR can be used to
specify paths to the plugins or libs using QT_ANDROID_EXTRA_PLUGINS
or QT_ANDROID_EXTRA_LIBS properties.

Note: The support is added for Qt build and Qt tests only.

Pick-to: 6.3
Change-Id: Ifdfd5d855e5a504fed55617786762a0c12b27773
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-03-26 23:35:36 +01:00
Marc Mutz
80b6bcc385 Short live Q_CONSTINIT!
It expands to the first available of

- constinit (C++20)
- [[clang::require_constant_initialization]] (Clang)
- __constinit (GCC >= 10)

Use it around the code (on and near static QBasicAtomic; this patch
makes no attempt to find all statics in qtbase).

[ChangeLog][QtCore][QtGlobal] Added macro Q_CONSTINIT.

Fixes: QTBUG-100484
Change-Id: I11e0363a7acb3464476859d12ec7f94319d82be7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-03-26 17:15:02 +01:00
Marc Mutz
edb64351cd QDom: preserve empty CDATA sections
Restores Qt 5 behavior.

Fixes: QTBUG-101992
Pick-to: 6.3 6.2
Change-Id: I3b9fc077c0a0fd30f4fcce7bfa342dbe96b2c582
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-03-26 12:01:14 +01:00
Marc Mutz
64db79f856 QDom: remove uneeded toString()
The trimmed() function is available on QStringView, too.

Pick-to: 6.3 6.2
Change-Id: I0cfde56d910da5abbebfb57396b22a1d21bdf763
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-03-26 12:01:03 +01:00
Sona Kurazyan
b625195893 QtCore: Replace remaining uses of QLatin1String with QLatin1StringView
Task-number: QTBUG-98434
Change-Id: Ib7c5fc0aaca6ef33b93c7486e99502c555bf20bc
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-03-26 01:44:05 +01:00
Sona Kurazyan
73a03a0c29 QSettings: fix formatting to match our coding style
Change-Id: I5cde2498e6423284f8abec7e717f262b6ea9eed8
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-03-26 00:46:04 +01:00
Volker Hilsheimer
e709e254d7 Make QUnixEventDispatcherQPA XFAIL the test
Needed for QNX, don't be overly specific with XcbUnix.

Pick-to: 6.3 6.2
Change-Id: I240313bc48d9d81d1f18f27ee11f7c9352e3e452
Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io>
2022-03-25 22:52:33 +01:00
Joerg Bornemann
02e5b0ffda CMake: Fix handling of the CROSSCOMPILING_EMULATOR property
CROSSCOMPILING_EMULATOR is a target property, not a test property.

Fixes: QTBUG-87864
Pick-to: 6.2 6.3
Change-Id: Icb07e9ed71a6bcbfceb7aa2116bf56eaa0a545c6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-03-25 22:43:49 +01:00
Ivan Solovev
862f42e806 Android: activate tst_qfactoryloader
- Use QT_ANDROID_EXTRA_PLUGINS to specify a correct plugins directory
- Update plugin names on Android to match the expected format
- Add explicit dependency on the plugins, so that they always get built
  and included in the APK
- Update the test code to respect the fact that plugins are packed
  differently on Android.

All these steps allow to enable this test for Android in CMakeLists.txt

Task-number: QTBUG-87438
Pick-to: 6.3 6.2
Change-Id: I09e389c761688cea216d8922b94ea3a2600f7a67
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: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-03-25 22:43:49 +01:00
Ivan Solovev
904d613a51 Android: activate tst_QPlugin
- Use QT_ANDROID_EXTRA_LIBS to correctly deploy libraries on Android.
- Update the test code to use the application libraries directory
  instead of resources on Android.

This allows to enable the test for Android in CMakeLists.txt

Task-number: QTBUG-87438
Pick-to: 6.3 6.2
Change-Id: I2f6d2d4f3ab3872cf7d7fad1668b5c2c3eef3aad
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-03-25 22:43:49 +01:00
Ivan Solovev
5ef748d321 Android: skip tst_QFileSystemModel::specialFiles()
The test will never pass on Android because it's missing permissions
to read root filesystem.
Skip the test instead of blacklisting it.

Fixes: QTBUG-87427
Pick-to: 6.3 6.2
Change-Id: Ib57a49b1d2bc4204f8aa2c3028c7220d23ff2a91
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-03-25 22:43:49 +01:00
Ivan Solovev
83a587bfa6 Android: activate tst_QThreadStorage
Skip a test that uses QProcess instead of blacklisting it.
Re-enable this test in CMakeLists.txt, so that it can be checked
in the CI.

Fixes: QTBUG-87431
Pick-to: 6.3 6.2
Change-Id: If8a4acd60735f355dffa60c28b8d07695ee33ec8
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-03-25 22:43:49 +01:00
Ivan Solovev
68f7ba2150 tst_QAtomicInt: do not check qlonglong alignment for x86_32 CPUs
For x86_32 the alignment of QBasicAtomicInteger<8 bytes> is not
equal to the alignment of TypeInStruct<8 bytes>, so do not perform
the check.

Fixes: QTBUG-87422
Pick-to: 6.3 6.2
Change-Id: I6e6c6cb7b2b7195e430d6a6991004bcfce16d4cb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-03-25 21:55:51 +01:00
Edward Welbourne
a8a7f6c4e6 Fix parsing of .cmake.conf in generate_expected_output.py
It relied on the set(QT_REPO_MODULE_VERSION ...) line being the first
thing in the file. It no longer is, and the variable is referenced in
an earlier condition.

Change-Id: I2bd2abd2a5680782ddd61f4bf4a4a3265b444d52
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-03-25 21:55:51 +01:00