qt5base-lts/tests/auto
Volker Hilsheimer b7d073e990 Refactor memory allocation for arguments of QMetaCallEvents
There are two cases:

In a BlockingQueuedConnection, QMetaCallEvent doesn't allocate memory
and instead passes already existing pointers through. A QSemaphore
is used to serialize data access between threads. So the constructor
taking a QSemaphore can be simplified to only accept an existing arg
array.

In a QueuedConnection, QMetaCallEvent needs to make deep copies of
the arguments, and memory needs to be allocated based on the number
of arguments. The previous code put the burden of memory allocation
on the code generating the event, while the memory was free'd by
~QMetaCallEvent. Instead, make it QMetaCallEvent's responsibility
to allocate and free the memory as needed, and adjust the code
generating QMetaCallEvents.

We can allocate the memory for types and pointers to arguments in a
single block, starting with the space for the array of void*, followed
by the space for the array of integers to avoid byte alignment issues.
By pre-allocating the space that's needed by three arguments, we can
avoid all mallocs for the majority of QMetaCallEvents.

Until this change has propagated through qt5.git, we need to keep the
old API that is still used by QtDeclarative around. Once QtDeclarative
has migrated to the new API, it can be removed.

Change-Id: Id7359ffc14897237ea9672dabae9ef199a821907
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-08-10 22:04:11 +02:00
..
bic/data Add binary compatibility files for 5.12 for QtBase 2018-12-21 19:42:57 +00:00
cmake CMake: Fix some failing cmake tests 2019-08-07 22:08:59 +02:00
concurrent Introduce QT_NO_LINKED_LIST and mark QtBase (almost) free of it 2019-07-12 14:26:30 +02:00
corelib Refactor memory allocation for arguments of QMetaCallEvents 2019-08-10 22:04:11 +02:00
dbus unblacklist passing tests 2019-07-08 11:01:42 +00:00
gui Add an easier way to change colorspaces 2019-08-02 21:07:54 +02:00
guiapplauncher
installed_cmake
network Remove the remaining usages of deprecated APIs of qtbase 2019-08-01 06:48:27 +02:00
opengl unblacklist passing tests 2019-07-08 11:01:42 +00:00
other QDateTimePrivate: inherit QSharedData and other cleanups 2019-08-07 20:09:13 +00:00
printsupport Remove the remaining usages of deprecated APIs of qtbase 2019-08-01 06:48:27 +02:00
shared Make tst_qwidget pass on High-DPI screens (Windows) 2019-06-03 10:41:08 +02:00
sql test: migrate QSqlDatabase test to QRegularExpression 2019-07-29 20:01:24 +02:00
testlib QTestlib: Check compared images for device pixel ratio 2019-07-09 20:15:34 +02:00
tools Warn about conflicting DESTDIR/TARGET combination in debug_and_release 2019-08-09 10:29:28 +02:00
widgets Remove usages of deprecated APIs of qtbase/widgets 2019-08-01 17:04:13 +00:00
xml Convert uses of QTime as a timer to QElapsedTimer 2019-06-14 10:42:33 +02:00
auto.pro winrt: Skip network auto tests for now 2018-06-22 05:02:39 +00:00
network-settings.h test: migrate QNetworkReply test to QRegularExpression 2019-06-10 16:49:19 +02:00