Take 2.
Re-land previously reverted commit, due to not handling resource names
that are not valid c++ identifiers. Now we sanitize the resource names
just like rcc does by replacing non-alphanumeric characters with
underscores.
Original commit message.
During the Qt 5 -> Qt 6 and qmake -> CMake porting time frame, it was
decided to keep resources in an object file (object library), rather
than putting them directly into a static library when doing a static
Qt build, so that the build system can take care of linking the
object file directly into the executable and thus not forcing
project developers to manually initialize resources with
the Q_INIT_RESOURCE() macro in project code.
This worked for most qmake and cmake projects, but it created
difficulties for other build systems, in the sense that these projects
would have to manually link to the resource object files, otherwise
they would get link time errors about undefined resource symbols,
assuming they kept the Q_INIT_RESOURCE() calls.
If the project code didn't contain Q_INIT_RESOURCE calls, the
situation would be even worse, the linker would not error out,
and the missing resources would only be discovered at runtime.
It's also an issue in CMake projects that try to link to the
library files directly instead of using the library target names,
which means the object files would not be automatically linked in.
Many projects try to do that because we don't yet offer a convenient
way to install libraries and reuse them in other projects (the SDK
case), so projects end up shipping only the libraries, without the
resource object files.
We can improve the situation by moving the resources back into their
associated static libraries, and only keeping a static initializer as
a separate object file / object library, which references the actual
resource initializer symbol, to ensure it does not get discarded
during linking.
This way, projects that link using targets get no behavior difference,
whereas projects linking to static libraries directly can still
successfully build as long as their sources have all the necessary
Q_INIT_RESOURCE calls.
To ensure the resource symbols do not get discarded, we use a few new
private macros. We declare the resource init symbols we want to keep as
extern symbols and then assign the symbol addresses to volatile
variables.
This prevents discarding the symbols with the compilers / linkers we
care about.
It comes at the cost of an additional static initializer per resource,
but we would get the same + a bigger performance hit if we just used
Q_INIT_RESOURCE twice (once in the object lib and once in project
code), which internally needs to traverse a linked list of all
resources to check if a resource was initialized or not.
For GHS / Integrity, we also need to use a GHS-specific pragma to keep
the symbols, which we currently use in qtdeclarative to ensure qml
plugin symbols are not discarded.
The same macros will be used in a qtdeclarative change to prevent
discarding of resources when linking to static qml plugins.
A cmake-based test case is added to verify that linking to static
libraries directly, without linking to the resource initializer
object libraries, works fine as long as the project code calls
Q_INIT_RESOURCE for the relevant resource.
This reverts commit bc88bb34ca.
Fixes: QTBUG-91448
Task-number: QTBUG-110243
Change-Id: Idce69db0cf79d3e32916750bfa61774ced977a7e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Headers must be free of Q_FOREACH uses if we want to white-list only
those .cpp files that still use Q_FOREACH in order to enable
QT_NO_FOREACH by default.
In common.h, the situation is pretty clear: the loop bodies clearly
don't modify the container being iterated over.
In MyServer, the situation is not clear at all, and this author
doesn't have the time to investigate, so take a copy and iterate over
that (eactly what Q_FOREACH does), and leave a comment.
As a drive-by, fix missing {} around multi-line loop bodies.
Task-number: QTBUG-115839
Change-Id: I06311a641c83daeee25f45522c694ac355ee86b6
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
QSqlDatabase uses a Q_APPLICATION_GLOBAL and so should not be used
without QCoreApplication instance. The test crashes if the existence
of an application instance is asserted in Q_APPLICATION_GLOBAL
code.
Pick-to: 6.6
Change-Id: Iaa3f4dff7b2722257735680dd3885aeed0ac810b
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
operator=(~) and assign(~) share similar names but, until now, have not
shared the same functionality. This patch introduces the usage of
QByteArray::assign() within the non-sharing assignment operator to
effectively boost efficiency by reusing the available capacity.
Since these assignment operators are frequently used in many places,
both within Qt and non-Qt code, this patch comes with benchmarks.
The preview of the benchmark results are compared with this patch and
before this patch. The findings indicate a slight enhancement in
performance associated with the assignment operator. Despite the results
displaying only a minor improvement, progress has been made. Therefore
use assign(QByteArrayView) as replacement.
(x86_64-little_endian-lp64 shared (dynamic) release build (O3); by
gcc 13.2.1, endeavouros ; 13th Gen Intel(R) Core(TM) i9-13900K
benchmarks executed with -perf -iterations 1000000
* The last value at the EOL represent the string size.
QByteArray &operator=(const char *ch) (current)
65 cycles/iter; 317 instructions/iter; 16.0 nsec/iter (5)
71.7 cycles/iter; 383 instructions/iter; 13.0 nsec/iter (10)
59.8 cycles/iter; 318 instructions/iter; 10.9 nsec/iter (20)
70.8 cycles/iter; 340 instructions/iter; 12.9 nsec/iter (50)
80.2 cycles/iter; 419 instructions/iter; 14.6 nsec/iter (100)
164.2 cycles/iter; 899 instructions/iter; 29.9 nsec/iter (500)
260.5 cycles/iter; 1522 instructions/iter; 45.6 nsec/iter (1'000)
QByteArray &operator=(const char *ch) (before)
66.8 cycles/iter; 317 instructions/iter; 16.9 nsec/iter (5)
76.5 cycles/iter; 383 instructions/iter; 13.9 nsec/iter (10)
63.7 cycles/iter; 318 instructions/iter; 11.6 nsec/iter (20)
71.6 cycles/iter; 344 instructions/iter; 13.0 nsec/iter (50)
77.5 cycles/iter; 419 instructions/iter; 14.1 nsec/iter (100)
143.4 cycles/iter; 893 instructions/iter; 26.1 nsec/iter (500)
270.8 cycles/iter; 1516 instructions/iter; 48.2 nsec/iter (1'000)
Task-number: QTBUG-106201
Change-Id: I0745c33f0f61f1d844a60960cc55f565320d5945
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Test sendEventsOnProcessEvents has been noticed to fail when
qgtk3 (Glib) is loaded - Should be fixed in QTBUG-87137
Moving test from blacklist to use QEXPECT_FAIL as it's more
recommended until test is fixed in the relevant configurations.
QEXPECT_FAIL is selected to use as original investigator
reported also some cases when glib is working. Therefore
this approach is giving us more insight for further
investigation is it always failing with glib or not.
It was also reported linkage to zeroTimer test QTBUG-84291,
but not sure why removing that has affected to this one.
Update to QEXPECT_FAIL documentation to tell in first place
that XPASS is not only marking it as XPASS but also failing
the test. Same is mentioned in different location but it
needs more searching or testing how it works in real test.
Task-number: QTBUG-115155
Change-Id: I7fb4ef28dba8adb7009be528f88fc758a12e9006
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Instead of copying a list, sorting it just to check it's sorted, and
making a QSet out of it just to check the size is the same as that of
the list (thereby checking there were no duplicates), simply apply
adjacent_find with greater_equal. If none of the elements is ≥ their
successor, that means all elements are < their successor, and _that_
means the range is sorted and has no duplicates. q.e.d.
Pick-to: 6.6 6.5
Change-Id: Id73c674ad4e29117370e8fc6af9fdfc690a3fba9
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
As a header, it would otherwise make all TUs that include it (with
PCH: all) incompatible with QT_NO_FOREACH.
Without deeper analysis (which economy of time forbids in this case,
given this is just a manual test that's probably run 10 times per
year), and seeing as this is in an event handler, I opted to play it
safe and iterate over a copy (which is exactly what Q_FOREACH
does). Added a comment to indicate it may not be needed.
Pick-to: 6.6 6.5
Task-number: QTBUG-115839
Change-Id: I7db75321dd34888f6dd7a64cccb7462ff35935fa
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
First include the common tst_qmimedatabase.cpp (and nothing else),
then implement the differing
tst_QMimeDatabase::initTestCaseInternal().
This will allow adding #undef QT_NO_FOREACH to tst_qmimedatabase.cpp
in the next step.
Pick-to: 6.6 6.5
Change-Id: Icc1890229e9443bd35c81d4f0440ba7df5da906c
Reviewed-by: David Faure <david.faure@kdab.com>
The single Q_FOREACH use here is simple, as it's over a local variable
that just isn't marked as const due to the way it's constructed, and
the loop body clearly doesn't modify the container, so the protective
copy that Q_FOREACH performs is not needed. But std::as_const() is, to
prevent a detach() (attempt). Add that.
Pick-to: 6.6 6.5
Task-number: QTBUG-115839
Change-Id: If228f649efd87388f6e312078b24a5b46ac8dc36
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Drag the QCOMPARE (which even dynamically allocated a QString
fromLatin1()) out of the QBENCHMARK loop. Testing performance of
QString::fromLatin1() and/or qCompare() is not pertinent to the task
at hand, which, ideally, doesn't involve any memory allocations, so
there's at least the chance that this skewed the result noticably.
Didn't run the benchmark as this was developed on an asan build.
Yes, this breaks comparability with the stone-age measurements
reported in comments there, so sue me.
As a drive-by, replace the fromLatin1() with a u_s UDL.
Pick-to: 6.6 6.5
Change-Id: I9b2a8b2e3596ec9b07c6b4ea369257b1a86e09db
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Various comments need to continue using the enumdata.py names, as they
associate data with particular enum members, but we can now correctly
use the en.xml versions of their names when we report them, rather
than the enum-friendly names we use in the code. Since this now means
the data may stray outside plain ASCII - it'll be UTF-8-encoded - this
implies replacing the QLatin1StringView()s of the code that formerly
read this data with QString::fromUtf8().
Fixes: QTBUG-94460
Change-Id: Id3b08875a46af58c0555c3e303b0e15a19441509
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We could already use dashes in some, rather than spaces, and now no
longer need to capitalize each word. This changes the *_name_list[]
entries for affected languages to more closely match what CLDR gives
as their names. It also amends various comments. Added tests for the
QLocale::*ToString() functions to cover the entries changed.
Task-number: QTBUG-94460
Change-Id: I0163795cb282881f15a97be00a5311c1936c3a09
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Test names and output need to be UTF-8 for the XML data formats to not
end up malformed - which would upset Coin's testrunner, when it
validates the XML as part of checking - and the few other uses of
toLatin1() were to ASCII content anyway, so can harmlessly (this being
test code, where the slight performance advantage of Latin-1 doesn't
matter) use toUtf8() as well, for the sake of uniformity.
Use of toLatin1() broke an imminent commit in which some territory,
script and language names depart from ASCII, leading to malformed
UTF-8 when they appear in test-data-row names.
Task-number: QTBUG-94460
Change-Id: Ifb826b1e417ba24fd862b93d24d0e7a38858a17f
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The following commits neglected to amend
tst_QImageReader::supportsOption() with the ImageOption enumerators
they added to QImageIOHandler:
- c0ba249a48
- 163af2cf53
- ba323b04cd
Fix first and foremost by adding the missing ImageOption::ImageFormat
to the list of PNG-supported formats (which, curiously enough, predates
the public history and therefore the above three commits), and second,
by rewriting the whole test function to enable -Wswitch, so further
additions are less likely to be forgotten.
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I102121b2c8a9067864b8ade2ebe2650be6fb6010
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Identifiers matching _[A-Z_].* are reserved for use by the C++
implementation. Replace the __ prefix of variable names with _v_,
making them non-reserved.
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I35127d7473678e2efd93a4b21847db562c53abd2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
In main.cpp, the loop is over a local variable which would be const
were it not for the multi-step initialization that I didn't want to
change. The loop body clearly doesn't modify the container, so port to
ranged for loop with std::as_const().
In printvolumes.cpp, the loop _does_ invoke unknown code (through the
function pointer passed as the second argument), but, as could be
expected, the two users of the function don't pass functions that know
about `volumes`:
- in the tst_QStorageInfo auto-test, an rvalue `volumes` is passed,
so we don't need to analyze the qInfoPrinter function passed there,
as it cannot possibly reference the temporary
- and in main.cpp of the manual test, we just pass printf (which is
technically UB (taking the address of a standard library function),
but I don't care right now).
Pick-to: 6.6 6.5
Task-number: QTBUG-115839
Change-Id: Ibcd10a0e0b3229d8f2a1d98545d8fa6d473a0f75
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Most of these are of trivial kind (loops over const locals).
The one that isn't, in cleanupTestCase(), is, however, also simple:
it's a loop over a local, too, but it would be too much churn to
change the initialization to make the container const, and the loop
body clearly doesn't modify the container, so just go with the
std::as_const() pattern here.
Task-number: QTBUG-115839
Pick-to: 6.6 6.5
Change-Id: I188a78ea67a63be2d50a81fea431e5ea9f2783cb
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
I'd previously understood CLDR's minimumGroupingDigits to mean the
most significant group must have that many digits. It turns out to
mean only that the first grouping separator doesn't get added unless
the more significant group has this many. Once we have one separator,
more can be added that do isolate a single digit.
In the process, I discover some of the prior arithmetic is incorrect;
it is now fixed. Added some basic testing, amended some existing
tests. In the process, fixed naming of some double validator tests.
Pick-to: 6.6 6.5
Fixes: QTBUG-115740
Change-Id: Ia6ce011ba72e72428b015ca22b97d815ebf751b2
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
This source file is included in four other test projects, so it makes
more sense to port it away from Q_FOREACH than to white-list it
everywhere it's used.
The change in ModelMoveCommand::doCommand() is trivial. I only dropped
the pointless top-level const of the loop variable as a drive-by.
The change regarding `parents` in ModelChangeChildrenLayoutsCommand's
doCommand() is also trivial, I just ported to braced initialization to
get the QList to be const. We're forced by the Qt API
(layoutChanged()) to use a QList here, therefore no array.
Ibid., the change regarding `persistent` is simple. The container
cannot be marked as const without a lot of churn to its initialization
(applying IILE, basically), but other than that, it's a local
variable, and the loop body clearly doesn't modify it.
Task-number: QTBUG-115839
Pick-to: 6.6 6.5
Change-Id: I7a0e85804626a3cc612921b49e72e4b9f30b676d
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
"Never use a dynamically-sized container for statically-sized data."
Port the loop from Q_FOREACH (which can't deal with arrays) to ranged
for (which can).
Pick-to: 6.6 6.5
Task-number: QTBUG-115839
Change-Id: Ib89d07fb751e3905a230ee5641e2e509e9415bed
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
There was a gap in its numbering, and the quick brown fix could do
with some competition.
Change-Id: I1283bbb6ba321ae2b65b4459327f2428a45f85cc
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This one isn't trivial, but straight-forward: the only place the
container is modified is in fill(). Like the setOpaqueChildren()
function, this is only called from top-level test functions, and, in
particular, not from event handlers (setAttribute() sends events).
That fill() doesn't clear() the container, even though the single
UpdateWidget instance is being reused across test functions, looks
wrong, but doesn't invalidate this analysis.
Task-number: QTBUG-115803
Change-Id: I284a19da2fe476278986c61810dd334fc73034b0
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
The Q_FOREACH is in a header, so we need to port away from it,
otherwise it makes any TU that includes it (in PCH builds: all)
incompatible with QT_NO_FOREACH.
This is a trivial case of marking the local constructor const, but go
a step further and replace the QList with a C array ("never use a
dynamically-sized container for statically-sized data"). Both
consumers of the container (after s/foreach/for/) can deal with array.
Pick-to: 6.6 6.5
Task-number: QTBUG-115839
Change-Id: I142e438dcf2d785bb34022a3fb1ff46b8eaa0edd
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
This is more readable and at the same time helps to eradicate some
more Q_FOREACH uses for an eventual global QT_NO_FOREACH for all Qt
sources (QTBUG-115796).
Task-number: QTBUG-115803
Change-Id: I9cbe76bee8a6306fab0c0bc94cd874405ca825ba
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
"Never use a dynamically-sized container for statically-sized data."
Port the loop from Q_FOREACH (which can't deal with arrays) to ranged
for (which can).
Pick-to: 6.6 6.5
Task-number: QTBUG-115839
Change-Id: I40773a0397b83cce0c803967ee3fd7ae274933d3
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
"Never use a dynamically-sized container for statically-sized data."
Port the loop from Q_FOREACH (which can't deal with arrays) to ranged
for (which can).
Pick-to: 6.6 6.5
Task-number: QTBUG-115839
Change-Id: Ifef42704c4f695a8fb05ea5d9b3e095af3f35171
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
"Never use a dynamically-sized container for statically-sized data."
Port the loop from Q_FOREACH (which can't deal with arrays) to ranged
for (which can).
Pick-to: 6.6 6.5
Task-number: QTBUG-115839
Change-Id: Iecfc037c8bbfc0b3196ed0c65f680768a8d2353a
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
QList rather pointlessly has a startsWith() function, which means this
code compiled. But the code makes no sense: it tests the same
condition over and over again, so I'm assuming that it should be
path.startsWith() and not path_s_.startsWith().
Amends 3f56950862, but that just
imported the code from qttools. I didn't check whether the bug was
present there, already.
Pick-to: 6.6 6.5
Change-Id: I98a4bbfe0400700655a5c2137f7a976a835a8d28
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
These are all trivial: all are over (already or newly-made) const
local variables, albeit sometimes at the cost of an extra scope
(can't, yet, use C++20 ranged for loops with initializer).
In resizeMaximizedChildWindows(), decided to leave the container
construction as-is and use std::as_const instead (applying IILE to
make the container const would be too much churn).
In setViewMode(), removed a pointless clear() that prevented the
container from being marked const. There are no references to the
container following the clear(), and the container does not hold smart
pointers, so the clear() cannot have had non-trivial side-effects.
Pick-to: 6.6 6.5
Task-number: QTBUG-115803
Change-Id: I00ce9c12ab696de30229f3605c16313af7eafffc
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
The single use of Q_FOREACH in this test is safe to port 1:1 to a
ranged for-loop, since we're in a constructor, and the loop body only
calls member functions of data members (incl. the base class), so we
cannot possibly modify the container passed in as a constructor
argument: any connections or event processing that could re-enter our
caller hasn't been set up, yet.
Task-number: QTBUG-115803
Change-Id: I7095aef1edddbda0d1b0c471192b18acd6fd1793
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
These are all simple: QObject::children() returns a reference-to-const
QList, so we can leave the calls in the for loop (no detach()ing).
The loop bodies also clearly don't modify the list of the QObject
children (they're just QVERIFYs).
Pick-to: 6.6 6.5
Task-number: QTBUG-115803
Change-Id: I9c5dcb2aefc433a1dead55dab669e645b6906963
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
This is iterating over data member containers that are otherwise only
touched in the constructor of the same object. Luckily, the
initialization of these containers does not require *this, so use
NSDMI and mark the containers const, proving they can never be
modified and thus the protective copy of Q_FOREACH isn't required. Now
that we got rid of Q_FOREACH, we can and do make them arrays for extra
measure ("never use dynamically-sized containers for statically-sized
data").
Unfortunately, C++ neither allows us to use "flexible array
members" nor AAA in NSDMI, so grab the nettle and supply the array
size manually (ever so slightly violating DRY, but the compiler will
complain if we get it wrong).
Task-number: QTBUG-115803
Pick-to: 6.6 6.5
Change-Id: Ibb2ce48b6dcaf2e9d3d1a625602f3865d280c7c6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This is iterating over a data member container that's otherwise only
touched in the constructor of the same object. The only reason why
it's not a const is that the initialization from QWizard::addPage()
makes that very cumbersome. So port to a ranged for-loop and apply
std::as_const().
Task-number: QTBUG-115803
Pick-to: 6.6 6.5
Change-Id: I033e3725df95b29a8ef295c4e74d746d83234835
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This is iterating over the keys() of a member container we've just
filled in the same function. The loop body clearly doesn't modify the
container being iterated over. Port to the future-proof ranged
for-loop over asKeyValueRange(), using the _-in-SB pattern Christian
Ehrlicher showed me to indicate we're not interested in the value.
Task-number: QTBUG-115803
Pick-to: 6.6 6.5
Change-Id: I3d86a1de9ea460b7d57fa421ea76e41d2c122f43
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This is safe to port to a ranged for loop, as it's iterating over a
private member container that is not modified under iteration
(WizardPage::shown() is just returning a boolean member).
Task-number: QTBUG-115803
Pick-to: 6.6 6.5
Change-Id: I50891e4b7509bd64399a128a5ee47d7795374f8e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This function is called only from one test function. Mark the
function's argument as const in the caller, bringing this use into the
const-local category, which is implicitly safe to port 1:1 to
ranged-for.
Task-number: QTBUG-115803
Pick-to: 6.6 6.5
Change-Id: I9145c1ae2aed5ab3cafc4947dc3eaaf9a27c6a04
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Fix typo so tst_qfuture on platforms without exceptions can be build
correctly.
Change-Id: I32c12effdda13da9c8669bfddd362acc1c8a14c7
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
For the child windows we have to use showNormal() explicitly,
as the default window state logic of platforms like iOS does
not have access to the QWindow, only to its flags, and we
can not use Qt::SubWindow as a proxy for being a child window,
as that's a window flag meant to be used for MDI sub windows.
Pick-to: 6.6
Change-Id: I2b5e669f6180ffdcb75479dece38ae5e5430aef6
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Ran the script, no new IDs to add. Revised tests of Central Standard
Time: America/Ojinaga has joined Matamoros for it, in Mexico.
Pick-to: 6.6 6.5
Fixes: QTBUG-115732
Task-number: QTBUG-111550
Change-Id: I9b41d8c0156b9fbe3961dbe9a35d55493fc55501
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
These are all trivial: all are over (already or newly-made) const
local variables.
The only noteworthy point here is that, in order to mark it as const,
I had to move a container definition to the more narrow scope in which
it was actually initialized. There are no references to the container
outside the narrow scope that would require it to be defined in the
larger scope.
Pick-to: 6.6 6.5
Task-number: QTBUG-115803
Change-Id: I20890f48a48ca662679f55fa5db759419d4db8c5
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
These are all trivial: all are over (already or newly-made) const
local variables.
Pick-to: 6.6 6.5
Task-number: QTBUG-115803
Change-Id: Idd6e65065ee27c2d29ce1b49607aadb2eaf5e15d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
During the Qt 5 -> Qt 6 and qmake -> CMake porting time frame, it was
decided to keep resources in an object file (object library), rather
than putting them directly into a static library when doing a static
Qt build, so that the build system can take care of linking the
object file directly into the executable and thus not forcing
project developers to manually initialize resources with
the Q_INIT_RESOURCE() macro in project code.
This worked for most qmake and cmake projects, but it created
difficulties for other build systems, in the sense that these projects
would have to manually link to the resource object files, otherwise
they would get link time errors about undefined resource symbols,
assuming they kept the Q_INIT_RESOURCE() calls.
If the project code didn't contain Q_INIT_RESOURCE calls, the
situation would be even worse, the linker would not error out,
and the missing resources would only be discovered at runtime.
It's also an issue in CMake projects that try to link to the
library files directly instead of using the library target names,
which means the object files would not be automatically linked in.
Many projects try to do that because we don't yet offer a convenient
way to install libraries and reuse them in other projects (the SDK
case), so projects end up shipping only the libraries, without the
resource object files.
We can improve the situation by moving the resources back into their
associated static libraries, and only keeping a static initializer as
a separate object file / object library, which references the actual
resource initializer symbol, to ensure it does not get discarded
during linking.
This way, projects that link using targets get no behavior difference,
whereas projects linking to static libraries directly can still
successfully build as long as their sources have all the necessary
Q_INIT_RESOURCE calls.
To ensure the resource symbols do not get discarded, we use a few new
private macros. We declare the resource init symbols we want to keep as
extern symbols and then assign the symbol addresses to volatile
variables.
This prevents discarding the symbols with the compilers / linkers we
care about.
It comes at the cost of an additional static initializer per resource,
but we would get the same + a bigger performance hit if we just used
Q_INIT_RESOURCE twice (once in the object lib and once in project
code), which internally needs to traverse a linked list of all
resources to check if a resource was initialized or not.
For GHS / Integrity, we also need to use a GHS-specific pragma to keep
the symbols, which we currently use in qtdeclarative to ensure qml
plugin symbols are not discarded.
The same macros will be used in a qtdeclarative change to prevent
discarding of resources when linking to static qml plugins.
A cmake-based test case is added to verify that linking to static
libraries directly, without linking to the resource initializer
object libraries, works fine as long as the project code calls
Q_INIT_RESOURCE for the relevant resource.
Fixes: QTBUG-91448
Task-number: QTBUG-110243
Change-Id: I39c325aac91e36d53c3576a39f881949c3b21e3f
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
My FreeBSD does not have /proc mounted, so this test doesn't run almost
ever. I have no idea about OpenBSD and no one has tested Qt on AIX in
over a decade.
Change-Id: Ifbf974a4d10745b099b1fffd1777a598ee91eb5d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Emit properties with MEMBER field specified with 'readwrite'
access. Previously only READ and WRITE filed where used
for deriving the access value.
Add a property using MEMBER to the test class used by
tst_qdbuscpp2xml.
Fixes: QTBUG-115631
Change-Id: I12351985a9fafd934ccc5e0b805077a9e44b6608
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
...while sharing the related code between the d3d backends.
The isHardCodedDefaults flag is not used in practice and is
now removed. Add the luminance behavior and SDR white level
(for Windows) to help creating portable 2D/3D renderers that
composite SDR and HDR content. (sadly the Windows HDR and Apple
EDR behavior is different, as usual)
The new test application is expected to run with the command-line
argument "scrgb" or "sdr". It allows seeing SDR content correction
(on Windows) in action, and has some simple HDR 3D content with
a basic, optional tonemapper. Also shows the platform-dependent
HDR-related screen info. With some helpful tooltips even.
Additionally, it needs a .hdr file after the 'file' argument.
The usual -d, -D, -v, etc. arguments apply to select the 3D API.
For example, to run with D3D12 in HDR mode:
hdr -D scrgb file image.hdr
The same in non-HDR mode:
hdr -D sdr file image.hdr
Change-Id: I7fdfc7054cc0352bc99398fc1c7b1e2f0874421f
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
which is flaky.
Task-number: QTBUG-115598
Pick-to: 6.6 6.5
Change-Id: Ibb0a0c6b1e225144e2ce796691c40bb7510bfd56
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
I.e. concatenating a null byte array and an empty-but-not-null byte
array should result in an empty-but-not-null byte array.
This matches the behavior of QString::append(QString) too.
Fixes: QTBUG-114238
Pick-to: 6.6
Change-Id: Id36d10ee09c08041b7dabda102df48ca6d413d8b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It relied on an implementation detail of operator+=(), that the latter
wouldn't just use assignement (e.g. if `this` is empty/null).
It also had undefined behavior, when the char array used with
fromRawData() went out of, the nested, scope, the code was pointing to a
dangling stack pointer.
Thanks to Thiago for the explanation in code review.
This ties in with further changes in this series, where append() is
changed to preserve null-ness; there is no way to preserve null-ness in
append() while keeping this unittest passing.
Change-Id: I43b9f60db9ce2d471f359f32bcc48e7b4cfceeab
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Everyone must have this by now. This test was 1193 ms of CMake time.
Since this was a PUBLIC feature, I've left it around with a constant
condition.
Change-Id: Ifbf974a4d10745b099b1fffd177754538bbff245
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
To avoid having to take high-DPI scaling into account for geometry
calculations/comparisons.
Pick-to: 6.6
Change-Id: I941b74781264455b70520df8d1e6e91592e00310
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Missing parts of local storage backend implemented:
- fallback mechanism
- removal of all child keys for groups
- variant decoding instead of string decoding
- report AccessError when organization is empty in settings' ctor
Some WASM-specific adjustments to tst_qsettings have also been
introduced.
Task-number: QTBUG-115509
Fixes: QTBUG-115037
Change-Id: I02cde965b11d98a64fc1ecb261d74838c508afd6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Ran the scripts, added the new enum members to docs.
Updated tests:
* Two of the new languages are right-to-left,
* Canada has replaced a silly date format with a sensible one.
Fixes: QTBUG-111550
Change-Id: Ie6f1e6e94477167c9e2b5c67e6518ca0f6a7e7fb
Reviewed-by: Mate Barany <mate.barany@qt.io>
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Introduce QT_SUPPORTS_INT128 and QT_NO_INT128 marcos to handle 128-bit
types. These macros allow to undef Qt's own 128-bit types and the
related code, but keep the compiler definitions unchanged.
This is required for Qt Bluetooth, where we need to use
QT_BLUETOOTH_REMOVED_SINCE to get rid of the APIs using
QtBluetooth-specific struct quint128 which clashes with the 128-bit
types. The idea is to use QT_NO_INT128 in Qt Bluetooth's
removed_api.cpp instead of directly undef'ing __SIZEOF_INT128__,
because the latter is UB.
This commit amends befda1acca.
Pick-to: 6.6
Change-Id: Ia2c110b5744c3aaa53eda39fb44984cf5a01fac2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Commit ca54b741d6 used the internal
has_operator_equal (and commit 01d94760d8
copied that for has_operator_less_than) instead of using the recursive
expander that was being used here. That assumed that the contained type
in std::optional would always be the last final check, which is an
incorrect assumption.
Fixes: QTBUG-115646
Pick-to: 6.6 6.5
Change-Id: Ifbf974a4d10745b099b1fffd177702934bec27ff
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
The blacklisted test does not crash, as its expected output indeed shows.
Pick-to: 6.5 6.6
Change-Id: I07522a7d065b5f39620975a3546bcd156024c41d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
In porting the selftest machinery to Catch2 in 24e83de8d1 we
accidentally added an unconditional early return when determining
whether to check for unexpected stderr output, resulting in not
checking error output on any platform.
The return statement has now been moved into the Q_CC_MINGW
condition, but as we now seem to have similar issues on macOS
and Linux with some of the tests outputting "Received signal 6
(SIGABRT)" as we do for QEMU, we need to add a few more explicit
early return conditions to the function.
Pick-to: 6.5 6.6
Change-Id: I7a25f000843b5f1003a5db883f08285185046b46
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Nothing prevents client code from calling QLocale::setDefault() before
we ever instantiate QLocale::system() - aside from some quirks that
mean setDefault(), currently, does instantiate QLocale::system() to
force initialization of defaultLocalePrivate - so using defaultIndex()
could set the system QLocalePrivate instance's index incorrectly.
In any case, even if the index is initially set correctly, a
subsequent change to the system locale would change the correct index;
and nothing outside QLocale::system() has access to the instance that
would then be remembering an out-of-date index.
Actually tripping over that inconsistency took some deviousness, but
was possible. The index is (currently) only used for month name
lookups and those special-case, for the Roman-derived calendars, the
system locale, to only use the index if the system locale offers no
name for a month. Meanwhile, updateSystemPrivate() uses the fallback
locale's index for its look-up of which CLDR data to copy into the
fallback QLocaleData for the system locale.
None the less, a non-Roman calendar's lookup will go via the index to
get at the CLDR data for that calendar, thereby exposing the system
locale's index to use; and, sure enough, a setDefault() could lead
that to produce wrong answers.
In QLocale::system() there's a cached QLocalePrivate, whose index we
need to ensure stays in sync with the active system locale. So pass
its &m_index to systemData(), which will now (when passed this) ensure
it's up to date. Since we always have called systemData(), to ensure
it is up to date, we can skip that update in the initialization of the
cached private and use m_index = -1 to let systemData() know when it's
in the initial call, thereby making the static cache constinit.
Amended a test to what proved the issue was present.
Change-Id: I8d7ab5830cf0bbb9265c2af2a1edc9396ddef79f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
- Pass the QList by value, no heap allocation and no plain new/delete
- A lambda means that there isn't runtime string-based lookup to find
the member method in QObjectPrivate
The code is only a couple of lines and used in a single place, so might
as well move the code from _q_reregisterTimers to the local lambda.
Modify tst_moc to account for the numer of methods in QObjectPrivate
changing. The test had hardcoded numbers.
Change-Id: I07906fc7138b8e601e4695f8d2de1b5fdd88449c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This reverts commit f647375275. There are
no signed integer overflows in atomics.
For the non-atomic side, unlike the commit being reverted, we fix the
signed integer overflow by removing the "signed" part instead of the
"overflow" part, and use unsigned integer overflows instead.
Change-Id: I53335f845a1345299031fffd176f5ba479163e44
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit adds some initial support for handling the 'L' suffix after
numbers. This one is especially important given that the __cplusplus
define is using it.
Other suffixes will be handled in some later commit, which should also
unify the already divergent parse behavior between DIGIT and PP_DIGIT
parsing (e.g. when it comes to byte prefixes).
Task-number: QTBUG-83160
Task-number: QTBUG-115558
Pick-to: 6.6 6.5 6.2
Change-Id: Ie61eae49c468abfaee80e7e4f7097917a254dc0e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
There is no QT_CONFIG_thread.
Thanks to Alexey Edelev for spotting why I couldn't run the test.
Pick-to: 6.6 6.5
Change-Id: I11c99d9b1ff8fed67b118028b76fba8ee6db3c42
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Those tests often fail on Android 13 on RHEL 8.6 and 8.8. This patch
skips them to unblock CI while the underlying reasons are investigated
and fixed.
Task-number: QTQAINFRA-5606
Change-Id: If088d69c2160470ef50b2e74cd9b9399451c526d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Rewritten to be a bit simpler, added a few more yield/YieldProcessor
alternatives, added RISC-V support.
[ChangeLog][QtCore] Added qYieldCpu() function.
Fixes: QTBUG-103014
Change-Id: I53335f845a1345299031fffd176f59032e7400f5
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Remove stray comment at the end of tst_qexplicitlyshareddatapointer.cpp
Pick-to: 6.6
Change-Id: I31a6c38002e56e7c43e527864ba3d9324950079f
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
Remove stray comment at the end of tst_qxmlstream.cpp
Pick-to: 6.6
Change-Id: I88550e2b75194e7895d8578ca0e8350af59d4dfe
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
This is done in anticipation of another test for dragging
Change-Id: I56961eb1d16a4a6b6c58890c9c882dea813dfa08
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
Use qwasmwindow_harness_entry instead of the old createQtAppInstance.
Change-Id: I381dd43d9144fe70f055c19db4cd95f90313883b
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
- rvalues, they work due to e.g. the implicit conversion to QString, so
the compiler picks the "const String &" overloads. (This may change by
adding rvalue overloads in a later commit, although that will mean
adding many more operator+() overloads to disambiguate the calls)
- QByteArray + QByteArrayView
- More P and more Q (even though in some cases P and Q are defined as
the same operator in some QStringBuilder unittest "scenarios")
Change-Id: I4e7daecdb6887fb52f45732cd32323af20b1b850
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
E.g. a group separator, a -/+ sign, or 'e' (exponent). Input ending with
one of these characters now returns Intermediate, as it can become
Acceptable if the user types more characters.
Remove a check from initialResultCheck(), as it's now covered by
QLocaleData::validateChars() checking that the last character in the
buffer is -/+, this works the same if buffer's size is 1.
Extended unittests based on the linked bug report; the other cases for
"last" are already covered by existing unittests.
Task-number: QTBUG-111371
Change-Id: I9b6979c29f07a5f57b040004cd3dbf4e27147c21
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Add an option to disable handling of positional binding so jsonb
operators are not screwed up
[ChangeLog][QtSql][QSqlQuery] Add setEnablePositionalBinding() to be
able to disable positional binding.
Fixes: QTBUG-96636
Change-Id: I428a9d3b10274b97292ab86a74d9b3971d6f10e9
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
The same _data() will be re-used with trim().
Change-Id: Ie9b794b7e8d40552d9cacb71df0f8a151d4348a5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
They aren't used because the C++11 atomics are the only atomics we've
supported since commit 9d1fab424e (5.6).
Pick-to: 6.6
Change-Id: I53335f845a1345299031fffd176f84ccd054b804
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
By the time QObject::destroyed() is emitted from ~QObject(), sender no
longer is-a SenderObject, only a QObject, so calling a SenderObject
member function on it is UB.
Says UBSan:
tst_qfuture.cpp:3854:84: runtime error: member call on address 0x60200000e550 which does not point to an object of type 'SenderObject'
0x60200000e550: note: object is of type 'QObject'
00 00 00 00 e8 3f 96 c9 51 7f 00 00 80 3e 00 00 c0 60 00 00 02 11 00 00 08 00 00 00 16 00 00 72
^~~~~~~~~~~~~~~~~~~~~~~
vptr for 'QObject'
Fix by removing the QObject::connect().
This, of course, breaks the test's WHEN, but I don't see how to keep
that WHEN without the UB. At least the THEN part is not invalidated,
and there doesn't appear to be another test that tests that destroying
objects before signal emission results in a cancelled future.
Amends 612f6999c8.
Pick-to: 6.6 6.5 6.2
Change-Id: I38ca4611c071e8fd200393b600210e36d4030bc6
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
QSpan is Qt's version of std::span. While we usually try not to
reimplement std functionality anymore, the situation is different with
QSpan. Spans are non-owning containers, so the usual impedance
mismatch between owning STL and Qt containers doesn't apply here:
QSpan implicitly converts to std::span and vice versa, making STL and
Qt APIs using spans completely interoperable.
We add QSpan mainly for two reasons: First, we don't want to wait
until we require C++20 in Qt and can use std::span. Second, in the
view of this author, some design decisions in std::span hurt the
primary use-case of spans: type-erasure for containers. This results
in two major deviations of QSpan from std::span: First, any rvalue
container is convertible to QSpan, allowing seamless passing of owning
containers to functions taking spans:
void sspan(std::span<T>);
void qspan(QSpan<T>);
std::vector<T> v();
sspan(v()); // ERROR: rvalue owning container
auto tmp = v();
sspan(tmp); // OK, lvalue
qspan(v()); // OK
This author believes that it's more helpful to have compilers and
static checkers warn about a particular wrong usage than to make
perfectly valid use-cases impossible or needlessly verbose to code.
The second deviation from std::span is that fixed-size span
constructors are also implicit. This isn't as clear-cut, because an
explicit QSpan{arg} isn't per-se bad. However, it means you can't
transparently change from a function taking decltype(arg) to one
taking QSpan and back. Since that's exactly what we intend to do in Qt
going forward, in the interest of source-compatibility, the ctors are
all implicit.
Otherwise, the API of QSpan follows the std::span API very
closely. Like std::span, QSpan isn't equality_comparable, because it's
not clear what equality means for spans (element-wise equal, or (ptr,
size)-wise equal?). The major API additions are Qt-ish versions of std
API functions: isEmpty() on top of empty() and sliced() instead of
subspan(). The (nullary) first()/last() functions (Qt speak for
front()/back()) clash with the std::span function templates of the
same name, so are not provided.
This patch adds QSpan as private API. We intend to make it public API
in the future.
Pick-to: 6.6
Fixes: QTBUG-108124
Change-Id: I3f660be90eb408b9e66ff9eacf5da4cba17212a6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
When parsing a string whose time-zone part matches local time's name,
use local time in preference to the QTimeZone with that name. The case
is ambiguous, and the bug was already fixed (by something else) in
dev, but this caused a failure in 6.2 through 6.5; and using local
time is more natural to QDateTime in any case. The fix incidentally
makes the the logic of the zone-resolution code more straightforward
and a closer match to how findTimeZone() found the match.
The issue was hidden from 6.6 by a change [*] to the handling of POSIX
rules, that lead to plain abbreviations such as CEST and BST - for
which the IANA DB has no entry - no longer being considered "valid"
zones, despite being technically valid POSIX zone descriptors
(effectively as aliases for UTC).
[*] commit 41c561ddde
Pick-to: 6.6 6.5 6.2
Fixes: QTBUG-114575
Change-Id: I4369901afd26961d038e382f4c4a7beb83659ad7
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It's actually testing that the system locale (which it obtains via the
default constructor, relying on setDefault() not being called first in
the helper program - which I'll soon change) behaves as expected.
Change-Id: Iedd2c1bb549288661c910dfbaac509ede9506d04
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Although QSystemLocale is (to make its query enum usable) defined
despite the QT_NO_SYSTEMLOCALE define, it's not used in that case, so
tests based on it won't work. So extend the reach of the #if-ery to
include the test using a custom class based on it. Also rename the
test from systemLocale(), as that's the name the emptyCtor() test
really should have.
Change-Id: Ief69bf161251cde47ee45014cc2627d42cfcc526
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Amends a452e22546. No new tests, existing
tests fails when QPlatformTheme returns a QIconEngine implementation
that provides the tested icons. However, the existing test fails when
the platform icon engine provides and address-book-new icon, and depends
on the order of test functions, as the name() test function modifies the
global theme name and search path. Fix those issues in the test.
Pick-to: 6.6
Change-Id: Ie1c1d14f08fad5e906296bab662df5cfacdbbf07
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Looping over the entries had a typo in it and was quite unnecessary,
as it just made a fresh copy of a list we already had.
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I0f3023b06163e5854d425d816e465785cda5fc91
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Allocate participating threads and objects on the stack, not the heap.
As a drive-by, port from QList to C arrays (never use a
dynamically-sized container for statically-sized data™).
Code predates the public history, all active branches are affected.
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: If8def658c1c7b505074938d637e78ad2d1f9fd57
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>