qt5base-lts/tests/auto/corelib
Volker Hilsheimer 185c3b080c JNI: Fix native functions that take a declared QtJniTypes class
Now that QtJniTypes::Objects are no longer primitive types that are the
same as a jobject, using those types in registered native functions
breaks. JNI will call those function with a jobject on the function
pointer, and lacking any type safety, the call to the registered
function will proceed with a wrong type of object on the stack.

To fix that, register the native function via a proxy that is a variadic
argument function, and unpack the variadic arguments into a list of
typed arguments, using the types we know the user-code function wants.
Then call the function with a tuple of those types using std::apply,
which gives us type safety and implicit conversion for free.

Add a test that exercises this.

Change-Id: I9f980e55d3d13f8fc16c410dc0d17dbdc200cb47
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
2023-09-27 19:44:58 +02:00
..
animation QSequentialAnimationGroup: extend bindable property unit tests 2023-09-03 18:20:21 +02:00
global Long live qxp::is_virtual_base_of 2023-09-26 22:32:51 +02:00
io QFile::moveToTrash: fix error reporting on Windows 2023-09-24 14:10:56 -07:00
ipc IPC: Move the legacy key to the QNativeIpcKey 2023-09-17 18:10:18 -07:00
itemmodels QItemSelectionModel: don't warn when destroying the model 2023-09-22 01:42:45 +02:00
kernel JNI: Fix native functions that take a declared QtJniTypes class 2023-09-27 19:44:58 +02:00
mimetypes QMimeType: simplify implementation of filterString 2023-09-13 23:27:44 +02:00
platform CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
plugin QUuid: convert bswap(Id128Bytes) to a hidden friend of Id128Bytes 2023-08-18 18:00:09 +02:00
serialization Fix renamed and duplicated namespaces in QXmlStreamWriter 2023-09-20 17:16:29 +02:00
text tst_QStringBuilder: update the warning re:includes in stringbuilder.cpp 2023-09-20 17:16:28 +02:00
thread QtFuture: Prevent whenAll()/whenAny() from creating reference cycles 2023-09-15 13:36:15 +00:00
time Warn on failure to construct valid system time zone object 2023-09-15 21:53:36 +02:00
tools QWeakPointer: fix the converting constructor from rvalues 2023-09-25 21:50:07 +02:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00