qt5base-lts/tests/auto/corelib
Volker Hilsheimer 941f49b018 JNI: treat enums as their underlying types
Android APIs use integer constants like enum values, so they are mapped
to one of the integeral types (jint, jshort, jlong etc) on the C++ side.
Enable C++ code to declare an equivalent enum (scoped or unscoped), and
to use that enum as a type in JNI calls by treating it as the underlying
type in the signature() generator.

Add a helper type trait that maps enums to their underlying type and
other integral types to themselves (we can't use std::underlying_type_t
on a non-enum type). Add tests.

Note: Java Enums are special classes with fields; this change does not
add any special support for those.

Change-Id: Iec430a1553152dcf7a24209aaebbeceb1c6e38a8
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
Reviewed-by: Zoltan Gera <zoltan.gera@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
2023-09-23 07:24:26 +02:00
..
animation QSequentialAnimationGroup: extend bindable property unit tests 2023-09-03 18:20:21 +02:00
global Long live Q_(U)INT128_C()! 2023-09-14 18:39:24 +02:00
io Fix undeclared identifier 'geteuid' for VxWorks 2023-09-12 02:07:04 +00: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: treat enums as their underlying types 2023-09-23 07:24:26 +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 QCommandLineParser: Warn invalid value calls 2023-09-21 22:05:06 +02:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00