qt5base-lts/tests/auto/corelib/kernel
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
..
qapplicationstatic CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qcoreapplication CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qdeadlinetimer CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qelapsedtimer CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qeventdispatcher tst_qeventdispatcher: port to QDeadlineTimer 2023-09-04 22:40:35 +03:00
qeventloop Remove the unix dispatcher from WASM builds 2023-08-22 17:19:50 +02:00
qjnienvironment CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qjniobject JNI: treat enums as their underlying types 2023-09-23 07:24:26 +02:00
qjnitypes JNI: treat enums as their underlying types 2023-09-23 07:24:26 +02:00
qmath CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qmetacontainer CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qmetaenum CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qmetamethod CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qmetaobject invokeMethod: Try invoking functor and member function accepting pointer, returning void 2023-08-24 07:45:04 +02:00
qmetaobjectbuilder CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qmetaproperty CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qmetatype QMetaType: fix recursive detection of std::optional operators 2023-07-31 18:43:55 -07:00
qmimedata tests/auto/*: port Q_FOREACH to ranged-for 2023-08-19 16:29:09 +03:00
qobject Allow QObjects to opt in to receiving ParentAboutToChange/ParentChange 2023-08-30 15:45:41 +02:00
qpermission Constrain QCoreApplication::requestPermission to compatible functors 2023-09-01 03:30:50 +02:00
qpointer CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qproperty CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qsignalblocker Implement QSignalBlocker::dismiss() 2023-08-31 22:11:51 +00:00
qsignalmapper CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qsocketnotifier QSocketNotifier: firm up the ordering in unexpectedDisconnection() 2023-07-11 13:44:29 -07:00
qtimer QTimer: extend property tests and fix binding loop 2023-09-03 18:20:51 +02:00
qtranslator Give QLocale::uiLanguages() a separator parameter 2023-08-16 16:25:48 +02:00
qvariant QVariant: add fromMetaType 2023-09-20 00:05:53 +02:00
qwineventnotifier CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qwinregistrykey CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00