qt6-bb10/tests/auto/corelib/kernel
Volker Hilsheimer a085a14d76 Generate JNI signature strings at compile time
Introduce an internal QtJniTypes namespace with types that allow us to
concatenate string literals at compile time. This makes it possible to
generate arbitrary strings based on types, which we can then use as
signatures to JNI method calls.

Move some of the private members of QJniObject into the QtJniTypes
namespace for consistency, and to allow further template specialization
by user code to make other types and their JNI signature string known.
Remove the "Jni" prefix from names.

Use the compile-time generated string in QJniObject methods that created
the signature string at runtime, which involved a temporary memory
allocation.

Treat 'void' as a primitive type (with signature string 'V'), and
remove redundant template specializations.

Add a test case to verify the the strings are constructed correctly
at compile time.

Change-Id: I5e3895a97f7dc1b86961f7a7855b899d9203037d
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-05-05 07:29:25 +02:00
..
qapplicationstatic Introduce Q_APPLICATION_STATIC 2021-11-18 20:53:27 +01:00
qcoreapplication Set version for tst_qguiapplication and tst_qcoreapplication 2022-02-17 15:51:29 +01:00
qdeadlinetimer Remove the qmake project files 2021-01-07 15:32:28 +01:00
qelapsedtimer Remove the qmake project files 2021-01-07 15:32:28 +01:00
qeventdispatcher Make QUnixEventDispatcherQPA XFAIL the test 2022-03-25 22:52:33 +01:00
qeventloop Compile autotests for Integrity 2021-09-20 17:29:04 +03:00
qjnienvironment Android: check if objectClass() is not null in registerNativeMethods() 2021-11-15 19:00:21 +00:00
qjniobject Fix set*Field JNI template calls 2021-05-05 16:28:27 +03:00
qjnitypes Generate JNI signature strings at compile time 2022-05-05 07:29:25 +02:00
qmath Make large inputs to qNextPowerOfTwo give undefined output 2022-02-17 17:20:34 +00:00
qmetacontainer Tests: Do not depend on transitive includes 2022-03-17 17:14:37 +01:00
qmetaenum Remove the qmake project files 2021-01-07 15:32:28 +01:00
qmetamethod QMetaMethod: Store method constness in metaobject system 2021-05-07 21:50:58 +02:00
qmetaobject Remove checks for features available in C++17 2021-10-02 17:54:39 +02:00
qmetaobjectbuilder QMetaObjectBuilder: Always set Data::metatypes 2022-03-02 10:43:49 +01:00
qmetaproperty Tests: Do not depend on transitive includes 2022-03-17 17:14:37 +01:00
qmetatype Clean up includes involving tst_qmetatype_common.h 2022-04-26 15:10:15 +02:00
qmimedata Remove the qmake project files 2021-01-07 15:32:28 +01:00
qobject QObject: add another couple of tests for broken connect() 2022-03-17 01:02:15 +00:00
qpointer Fix autotest runtime failures on INTEGRITY 2021-12-16 19:45:08 +02:00
qproperty Replace uses of _qs with _s in tests 2022-04-07 19:30:17 +02:00
qsharedmemory Core: Fix tests that did break because QProcess security fix 2022-02-24 09:49:52 +02:00
qsignalblocker Remove the qmake project files 2021-01-07 15:32:28 +01:00
qsignalmapper Remove the qmake project files 2021-01-07 15:32:28 +01:00
qsocketnotifier CMake: Remove the usage of QT_SOURCE_TREE from tests 2021-07-12 18:56:14 +02:00
qsystemsemaphore Revert "Blacklist: test cases blacklisted in tst_QSystemSemaphore:" 2022-04-01 08:00:39 +00:00
qtimer Include qproperty.h where needed 2021-11-04 21:45:02 +01:00
qtranslator tst_qtranslator: fix memleak 2022-01-03 11:22:53 +00:00
qvariant Tests: Do not depend on transitive includes 2022-03-17 17:14:37 +01:00
qwineventnotifier Repair tst_qwineventnotifier 2021-03-29 15:54:05 +02:00
CMakeLists.txt Generate JNI signature strings at compile time 2022-05-05 07:29:25 +02:00