Commit Graph

54876 Commits

Author SHA1 Message Date
Thiago Macieira
05e029619f CMake: fix running of headersclean targets when CMAKE_CXX_FLAGS is set
We were passing the full option from the user as a single string in the
command-line to the compiler.

clang++ -c "-O3 -g1 -march=tigerlake -mprefer-vector-width=256 -maes" [...]
error: invalid integral value '3 -g1 -march=tigerlake -mprefer-vector-width=256 -maes' in '-O3 -g1 -march=tigerlake -mprefer-vector-width=256 -maes'

Pick-to: 6.2 6.3
Fixes: QTBUG-100315
Change-Id: I6fcda969a9e9427198bffffd16ce83150d4e4263
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-01-31 19:07:58 -08:00
Laszlo Agocs
2c008d6faf rhi: d3d11: Try uuidof instead of IID_* to help old MinGW
Fixes: QTBUG-100294
Pick-to: 6.3
Change-Id: Iee90355ecd48a753f9a7ec53e7f5758e3d12eddf
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2022-02-01 03:02:18 +01:00
Marc Mutz
aaa74e8f99 QWeakPointer: make default ctor constexpr
... and thereby also QPointer's.

Found by applying C++20 constinit around the codebase.

Pick-to: 6.3 6.2
Change-Id: I9f149b2346624ca913c29b796f94ac7d24fe560a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-02-01 01:59:10 +00:00
Marc Mutz
724a369308 QGuiApplication: constant-initialize lastCursorPosition
Because we used (exported) qInf() to initialize static QPointF
QGuiApplicationPrivate::lastCursorPosition, the initialization was
done at runtime.

Fix by using qt_inf(), which is inline and constexpr.

Pick-to: 6.3 6.2 5.15
Change-Id: I8b07c6c8bf1f644eaa88f2f33166045726915725
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-02-01 01:31:49 +01:00
Ben Fletcher
9ef702a37b rhi: Add the basic infrastructure for geometry shader support
.. but this will only be supported on Vulkan, OpenGL 3.2+, and Open GL
ES 3.2+ for the time being.

The situation is:

- Vulkan is working.  qsb accepts .geom files already, and QShader has
  existing geometry shader support.

- OpenGL 3.2 and OpenGL ES 3.2 are working.

- D3D11 is not working.  D3D11 supports geometry shaders, but SPIRV-
  Cross does not support translating geometry shaders to HLSL.

- Metal is not working.  Metal does not directly support geometry
  shaders.

Change-Id: Ieb7c44c58b8be5f2e2197bf5133cf6847e6c132d
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2022-01-31 08:53:37 -08:00
Ben Fletcher
1c3ae79ad3 rhi: Add support for polygon fill mode
Support for Polygon Mode (Triangle Fill Mode in Metal, Fill Mode in D3D)
in the RHI graphics pipeline.

Options are Fill and Line

Status:
    OpenGL - ok
    Vulkan - ok
    Metal - ok
    D3D11 - ok
    OpenGL ES - does not support glPolygonMode.

Change-Id: I20b7ef416624700c3dc8d1cbe6474f4ca3889db8
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2022-01-31 08:52:05 -08:00
Alexey Edelev
1d28fd7a9c Restore missing Qt definitions
Restore the 'QT_NO_JAVA_STYLE_ITERATORS' and
'QT_NO_NARROWING_CONVERSIONS_IN_CONNECT' definitions for Qt
targets.

Add the function that adds global definitions for Qt targets according
to the provided scope and the target property-based switch to disable
the definition for a specific target.

Pick-to: 6.2 6.3
Task-number: QTBUG-100295
Change-Id: I28697e81f9aabc45c48d79aae1e5caea141e04e1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-01-31 17:40:43 +01:00
Sona Kurazyan
f2f5c7d2b7 QtFuture::connect: fix for signals with a single std::tuple argument
If the signal passed to QtFuture::connect() takes multiple arguments,
we need to wrap the arguments in a std::tuple when reporting the result.
To detect this case we were checking if the result type of a QFuture
returned by QtFuture::connect() is a std::tuple, but this was not
correct: the result type could be a std::tuple also if the passed
signal takes a single std::tuple argument. Instead, check if the signal
takes more than one argument.

As a drive-by modified the tst_QFuture::signalConnect to use const
values for tuples used in multiple test-cases, to avoid repetition.

Fixes: QTBUG-100071
Pick-to: 6.2 6.3
Change-Id: I1ce39cf87028f36ef94a9d1a4423b0c51473afd4
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-01-31 17:40:43 +01:00
Ivan Solovev
26fa539ad2 Blacklist tst_QFileSystemWatcher::signalsEmittedAfterFileMoved on all Windows versions
The test was already blacklisted for Windows 10 and Windows 7. Now it
is flaky on Windows 11 as well.
Blacklist it for all windows platforms.

Task-number: QTBUG-98478
Pick-to: 6.2 6.3 5.15
Change-Id: I870fb6ce80cfe244a76d08bf40677fdb6becab97
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
2022-01-31 17:39:33 +01:00
Jani Heikkinen
43dfe13e2c Bump version from 6.2.0 to 6.4.0 in tests as well
Change-Id: I6fbce239f1ce45c921cf3bf1c3970e03d0e520d6
Reviewed-by: Antti Kokko <antti.kokko@qt.io>
2022-01-31 17:20:06 +02:00
Jani Heikkinen
994fd04b2b Bump version to 6.4.0
Change-Id: Ie0e2133d6c9125b901364c979c60b6efd585f026
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2022-01-31 17:20:06 +02:00
Alexandru Croitor
8dce9ee119 rcc: Fix missing IGNORE directive for Qt version in tst_rcc
The IGNORE directive was likely removed as an oversight
in the linked change.

This fixes the test to pass when bumping the Qt version.

Amends 9836dbd6ee

Change-Id: I497325d6d8b8b67cce7b0840bfb9bfa70d85fe73
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-01-31 16:20:06 +01:00
Mårten Nordheim
8437c27582 QNetworkReply: rename socketConnecting to socketStartedConnecting
From the API review.

Pick-to: 6.3
Change-Id: Ic05737db79327e7811fcd974a70914b837e06601
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-01-31 14:24:11 +01:00
Leena Miettinen
ec57418ecf Doc: Update Notepad tutorial
Update to use Qt Creator 7.0 and CMake as the build system.

Fixes: QTBUG-100075
Pick-to: 6.3
Change-Id: I71e1d1446a2c79c98423ca5d4427b4b4eb00021b
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2022-01-31 14:24:11 +01:00
Oliver Wolff
a3503c8eae Blacklist tst_QWindow::modalWindowEnterEventOnHide_QTBUG35109 for Win
The test also fails on Windows 11

Pick-to: 6.2 6.3
Task-number: QTBUG-98475
Change-Id: Iab079587d743500d222f2272d1145424e079b4a3
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
2022-01-31 12:40:35 +01:00
Samuli Piippo
42221aa84c Catch2: upgrade to 2.13.8
Update Catch2 header to latest released version. Needed
to build correctly with glibc 2.34.

Two patches applied on top of the upstream release. Previously
used Qt specific change extracted to a separate patch file.

Fixes: QTBUG-95842
Pick-to: 6.3 6.2
Change-Id: I67e442bbe756ff00c96a45eabf593f7aecddd628
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-01-31 09:26:00 +02:00
Edward Welbourne
9a83706046 Fix misguided winding backwards past start of start of MS TZ data
QWinTimeZonePrivate::data()'s search for a rule applicable to a given
time, in the first year whose milliseconds qint64 can represent, tries
to look at the preceding year to get start-of-year data, which leads
to misleading results. It does so to determine whether to use a rule's
standard or daylight-saving details, but this year is long before the
invention of daylight-saving time, so we can bypass the whole mess.

Unfortunately, MS's data does pretend (in some zones) that DST has
always been in effect, so cutting off that claim at some historical
point will actually get better results for before the cut-off than for
the period after it, until the relevant zone actually adopted DST.
Conservatively put the cut-off at 1900, before any actual zone used
DST, albeit after the idea was originally floated.

This fixes a failure found by some QDate::{start,end}OfDay() tests
that I want to introduce.

Pick-to: 6.3
Task-number: QTBUG-99747
Change-Id: I15cf9dd092b946191e8863c7e85fbeb4ba6c106d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-01-30 20:45:15 +01:00
Marc Mutz
2e4db2596a QCalendar: port registry from QHash to QFlatMap
Unlike many other uses of QFlatMap, this actually promises to hit the
QFlatMap sweet spot, and we're using all its levers.

To wit:

- Enable lookup via QAnyStringView through a transparent comparator
  without having to convert the QAnyStringView to QString first. This
  is impossible with QHash, because qHash() values are not consistent
  for different string types: u"a"_qsv == "a"_L1, but qHash(u"a"_qsv)
  != qHash("a"_L1).  The relational operators don't have this
  consistency problem, and they also implement case-insensitive
  comparison, another thing qHash lacks.

- Pick different types of containers for keys and values. For the
  keys, use QStringList, which makes availableCalendars() trivial and
  extremely fast. We can reserve() the flat_map to limit the effect of
  reallocations, because we have a pretty good idea about how many
  entries we'll have. For the values, use the same container as for
  byID. This might be better with QVarLengthArray, but that's for
  another patch.

- Fix the double lookup in registerBackendLockHeld() by using
  try_emplace() instead of contains() + insert().

To enable QFlatMap's full potential, we still need to teach
ensurePopulated() to create the two containers for the QFlatMap
unordered and let QFlatMap sort them in one go, but that, too, is for
another patch.

Change-Id: I7fe4f3f7596e9b234696fbc8e467128b85629f8a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-01-30 14:18:36 +00:00
Edward Welbourne
9135531c33 Refine QTZP_win's msecsToDate() by trusting arithmetic
Division and modulo are guaranteed to be consistent, with the former
truncating towards zero, so the latter giving a remainder that either
is zero or has the same sign as the numerator. In particular, when the
numerator is positive, the remainder is necessarily greater than minus
it, so the formerly correct but unilluminating arithmetic necessarily
gave the answer one and we can just --jd rather than doing anything
cleverer. Assert the fact that ensures this.

Pick-to: 6.3 6.2
Change-Id: Ia718bb947192f1fd2eb36549be12d30e4ee03d58
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-01-30 15:17:55 +01:00
Marc Mutz
58e8ae5605 QFlatMap: fix is_transparent detection
Add a level of indirection via void_t such that

    struct is_transparent {};

works, and not just

    using is_transparent = <unspecified>;

Pick-to: 6.3
Change-Id: I3ca2af6a07e6989dc95abc10fb2d0078a5269e5b
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-01-30 10:11:46 +01:00
Marc Mutz
2b617a29dc QFlatMap: remove binary_find()
The private binary_find() overload set is literally identical to the
public find() one, so cut out the middle man.

One less level of function templates to compile.

Pick-to: 6.3
Change-Id: Ia7b248d883b7bcff39c4f7b470d2567970572885
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-01-30 10:11:25 +01:00
Marc Mutz
64bc6509c3 QFlatMap: add full is_transparent support [3/3]: add overloads
Now add the missing overloads for mixed-type lookups, supported by
is_transparent Compare objects.

Pick-to: 6.3
Change-Id: Ib588b6a4f733d5d9908c8c7d7c209df6e7bd6674
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-01-30 04:14:21 +01:00
Tatiana Borisova
d336fdd393 Fix tst_qfloat16 run time error for INTEGRITY (tested on sa8115)
- Bounds::has_denorm returns denorm_indeterminate.
  It is expected behavior for GHS compiler.

Task-number: QTBUG-99123
Pick-to: 6.2 6.3
Change-Id: I8402c541093a73623b6dc507012d98e565789cff
Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-01-30 00:02:38 +00:00
Dimitrios Apostolou
b013f94086 Write XML test log files even for the flaky test re-runs
Previously the qt-testrunner script was avoiding to write XML log files
for the flaky test re-runs, since parsing them always provides limited
information about what went wrong (for example unparseable files) and
might miss issues completely (for example a crashed test might not even
write a log file), or even mislead if multiple different data points
about a single testcase end up into the database..

But currently Coin is the system that uploads test information to the
testresults database and expects to find such log files in an attempt to
send as much information as possible regarding failures.

Re-enabling these log files will allow Coin to deduce as much
information as possible about the test runs.

This is a temporary step at least, until the test-uploading logic is
separated from Coin. Then it will be easier to find the full information
about what happened with flaky or crashed tests by special logs from
qt-testrunner.py, which is the test re-running orchestrator and
therefore has more knowledge about what went wrong.

Fixes: QTQAINFRA-4754
Change-Id: I69e4469cbe6c0a6ca5b2473eaf8d034632564342
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Toni Saario <toni.saario@qt.io>
Reviewed-by: Simo Fält <simo.falt@qt.io>
2022-01-30 01:00:35 +01:00
Dimitrios Apostolou
b4d9d5c89c qt-testrunner: do not try to re-run initTestCase and others
Some function names are special for qtestlib, in the sense that they can
not be specified as a command line argument to run individually.

In such cases qt-testrunner treats the failure specially and tries once
to re-run the full test executable.

Fixes: QTBUG-89011
Change-Id: I0cc25f91c57374e5ac65ade10e2e223fe969f211
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
2022-01-30 01:00:35 +01:00
Marc Mutz
1ae5b3628d QCalendar: replace two overloads with one QAnyStringView function
The backend was already ported, so this is just about applying
QT_REMOVED_SINCE and updating the docs.

Change-Id: I2c78908deb9cdb3cee19ce8bc148ab3117c1ad9a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-01-30 00:03:45 +01:00
Marc Mutz
9bfc8f348d QFlatMap: add full is_transparent support [2/3]: shuffle functions
Move the do_{remove,take}() functions into the private section,
cleaning up after the previous step.

Pick-to: 6.3
Change-Id: I3325336458b34e7f376b42bfe68355d93ff4ce70
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-01-29 20:04:24 +01:00
Allan Sandfeld Jensen
7e591453be Fix finding GSSAPI
The package is called mit-krb5-gssapi on Ubuntu, and the LIBDIR variable
was missing an underscore.

Pick-to: 6.3 6.2
Change-Id: I85b5603c1161f33462aa71bbd522d40dd7489405
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-01-29 11:46:04 +00:00
Volker Hilsheimer
35e938c2d8 Remove QEXPECT_FAIL for test passing on Android
The test has been XPASS'ing recently on Android.

Reverts 67e209f59f.

Fixes: QTBUG-69216
Change-Id: Ic629cc28936e0ef27277c243717e97226bf01b1c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-01-29 10:47:08 +01:00
Thiago Macieira
ce41151215 qfloat16/F16C: rewrite the F16C conversion with overlapping
We don't have to be completely sequential. It's perfectly fine to
overlap loads and stores and this leads to simpler code.

Change-Id: I6fcda969a9e9427198bffffd16ce56ebbc948379
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-01-28 22:40:25 -08:00
Thiago Macieira
073454901d qfloat16: add missing static
Commit 0df7831d01 moved these functions
into this file, but forgot to add the marker.

Drive-by replace Q_DECL_NOEXCEPT with noexcept

Pick-to: 6.3
Change-Id: I6fcda969a9e9427198bffffd16ce5543c5fd544e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-01-28 22:40:23 -08:00
Thiago Macieira
cdb78d7993 qsimd/x86: disable the F16C, FMA, and VAES features if AVX is disabled
Those three features can't be used without the VEX prefix, which
requires that the OS has enabled saving of the AVX state on context
switches (i.e., use XSAVE).

The list is automatically maintained by the updated script in
OpenDCDiag[1]. I need to update the copy in util/x86simdgen.

[1] https://github.com/opendcdiag/opendcdiag/blob/main/framework/scripts/x86simd_generate.pl

Pick-to: 6.3
Change-Id: I6fcda969a9e9427198bffffd16ce55193a6cb069
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-01-28 22:40:22 -08:00
Thiago Macieira
671035035a QVersionNumber: remove the "pure" attribute from commonPrefix()
This function can allocate memory, so it's not pure.

Pick-to: 5.15 6.2 6.3
Change-Id: I6fcda969a9e9427198bffffd16ce7fcff3ae021d
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-01-28 22:39:57 -08:00
Thiago Macieira
c05ee60a2f QEvent: initialize the static userEventTypeRegistry constexprly
The {} is the difference.

Pick-to: 5.15 6.2 6.3
Change-Id: I6fcda969a9e9427198bffffd16ce8dabd213393e
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-01-29 04:26:09 +00:00
Marc Mutz
82147ce33a QString: optimize finding size=1 needles in QLatin1Strings
Use memchr() if the needle has size() one, and add a fast path in
findString(QLatin1String, QStringView) to circumvent the QVLA path. We
might want to extend this and use a simple C array for very short
needles and (cached?) Boyer-Moore for anything larger.

Pick-to: 6.3
Change-Id: I8364ea9f004d537be8a09cc751408d8adb902d13
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-01-29 03:43:29 +00:00
Marc Mutz
7b7c3355f2 QFlatMap: add full is_transparent support [1/3]: split functions
Extract Methods do_foo(iterator) from their respective foo(Key)
methods.

This is done in order to separate the common code from the code that
will differ in the is_transparent overloads.

Leave the function bodies where they previously appeared, for easier
reviewing.

Pick-to: 6.3
Change-Id: I49f41f9121a047df696f39daeaa0a9da6a16dddb
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-01-29 02:40:12 +01:00
Marc Mutz
f08f28548a QFlatMap: implement mutable op[] via try_emplace()
De-duplicates code.

Pick-to: 6.3
Change-Id: Id7841a0717cd66bd56d489e6d2630e9eeb284316
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-01-29 02:40:12 +01:00
Ben Fletcher
1e07787142 rhi: Fix tessellation support for OpenGL
Added shader stage mapping for tessellation stages.

Manual test rhi/tessellation now works for OpenGL.

Change-Id: I7906b21e9d6e20883f17729f077dba57aa29f4fd
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2022-01-28 14:31:02 -08:00
Marc Mutz
37714d255b QCalendar: replace ostream-style qWarning with printf-style one
Saves the <qdebug.h> include and expands to a lot less code.

Pick-to: 6.3 6.2
Change-Id: Ic1a0aa707e7c0d4bd54da45a7fcafbf898681b2d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-01-28 22:00:22 +01:00
Marc Mutz
d030606a5a QFlatMap: use erase() in remove()
De-duplicates code.

Pick-to: 6.3 6.2
Change-Id: I95d3d6f57c2f3716b8f3f549d1cc2a02cde9e996
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-01-28 22:00:22 +01:00
Marc Mutz
1cb192bf3d QFlatMap: replace manual const_cast<>s with std::as_const
Shorter, because it doesn't need to name the type.

As a drive-by, replace all remaining uses of the private full_map_t
alias with 'QFlatMap', the class name, which, also in templates,
refers to the class, not the class template.

Pick-to: 6.3 6.2
Change-Id: Ie3bada43d9d28a84543e8baa8a36c522dff80b9e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-01-28 22:00:21 +01:00
Thiago Macieira
7792360413 QVersionNumber: remove "pure" declaration from fromString()
GCC doesn't like that we modify the contents of passed by pointer in the
pure function. Reading the description of this attribute in the GCC
manual was ambiguous then, but I can see the GCC maintainers'
interpretation.

See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104243

Fixes: QTBUG-62185
Pick-to: 5.15 6.2 6.3
Change-Id: I6fcda969a9e9427198bffffd16cdf815d059d252
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-01-28 13:00:21 -08:00
Marc Mutz
55a88206f3 QCalendar: eradicate Java-style iterator
We had QT_NO_JAVA_STYLE_ITERATORS in .qmake.conf, but it was lost in
the transition from QMake to CMake, and - plop - they start trickling
in again.

Pick-to: 6.3 6.2
Change-Id: Ib92937e5fe510aba2aad92809f7a6d5fbae6f3a0
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-01-28 22:00:21 +01:00
Marc Mutz
096e8b5f65 QLocale: replace a QList with QVLA for duplicate tracking
An alternative would have been QDuplicateTracker, but the maximum
number of entries in the tracker is statically limited to six, so we
don't need a fancy hash table, linear scan is good enough.

Pick-to: 6.3
Change-Id: I8ca97d239723b51892cb13a43b1d1a6412faa561
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-01-28 22:00:21 +01:00
Ilya Fedin
d13ee2dc1a Let QXcbGlxWindow::createVisual fallback to QXcbWindow::createVisual
When flatpak refused to install org.freedesktop.Platform.GL.default for
me, I got into a situation without GL drivers and Qt applications
stopped getting transparency windows.

They fallback to use root_visual and it doesn't provide sufaces with
alpha, I tried to add fallback to QXcbWindow::createVisual just like
QXcbEglWindow::createVisual does and voila, they got transparency.

Pick-to: 6.3 6.2 5.15
Change-Id: I9f401643b3ef231048c6e9e250121c96514101f5
Reviewed-by: Liang Qi <liang.qi@qt.io>
2022-01-28 16:15:28 +01:00
Thiago Macieira
1acdb290e8 QUrl: use qsizetype & size_t in place of int & uint
Allows for URLs with more than 2 billion characters. I'm sure someone
needs this...

Change-Id: I0e5f6bec596a4a78bd3bfffd16c9991e4e6cacbf
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
2022-01-28 01:50:48 +00:00
Ivan Solovev
850a7f1238 Android A11Y: fix content update notification when object is hidden
When the object is hidden, we should not use its viewId to notify
content changed. Instead, we need to use its parent id.

Task-number: QTBUG-95764
Pick-to: 6.3 6.2 5.15
Change-Id: I608658e21c401d76459a09e4b274c60b849ace86
Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-01-28 00:22:41 +01:00
Ivan Solovev
f6ddb3e921 Android: explicitly remove accessibility focus when element is hidden
Before this patch when an element that had an Accessibility focus was
hidden (for example, a button because of Accessibility.onPressAction),
the focus was still remaining on that hidden element. So the next
doubletaps on the screen caused the Accessibility.onPressAction() of the
hidden element to be executed again and again.

To fix this, we have to explicitly send a FOCUS_CLEARED event to the
Android OS, when the object is hidden.
Another needed fix is to set the m_focusedVirtualViewId in
notifyObjectFocus() properly.

Fixes: QTBUG-93393
Pick-to: 6.3 6.2 5.15
Change-Id: I6ff8a19868b96842719924037545c4ecc91e0dad
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-01-28 00:22:41 +01:00
BogDan Vatra
c1a93b20ff [Android]: Handle the screen name, modes and refreshRate properly
Fixes: QTBUG-87136
Fixes: QTBUG-93823
Fixes: QTBUG-94959
Pick-to: 6.3 6.2 5.15
Change-Id: Id480e22611ec949b5e3ee780fc695fb502a5950c
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-01-28 00:22:41 +01:00
Tatiana Borisova
e76d27d3ed Exclude tst_selftests when feature process is disabled
- It should not be built for systems without process feature.

Task-number: QTBUG-99123
Pick-to: 6.2 6.3
Change-Id: I71caa59c2168435894c7d1afcc8226e44178439f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-01-27 21:35:58 +02:00