qt5base-lts/tests/auto
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
..
bic/data Add binary compatibility file built against 6.5.0 2023-04-19 15:40:36 +00:00
cmake CMake: Fix config condition evaluator 2023-09-21 21:46:46 +02:00
concurrent tst_QtConcurrentMedian: compile with QT_NO_FOREACH 2023-08-19 16:28:20 +03:00
corelib JNI: treat enums as their underlying types 2023-09-23 07:24:26 +02:00
dbus QDBusMarshall test: avoid an atomic assignment 2023-09-14 18:39:24 +02:00
gui Support loading variable fonts as application fonts in Freetype 2023-09-20 21:37:50 +02:00
guiapplauncher Move Weather Anchor Layout example to manual tests 2023-03-02 05:55:57 +01:00
network Update public suffix list 2023-09-20 22:33:18 +02:00
opengl tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
other Silence compiler warning 2023-09-22 20:40:36 +02:00
printsupport Dialogs: clean up native dialogs when object gets destroyed 2023-09-06 23:12:33 +02:00
shared Support loading variable fonts as application fonts in Freetype 2023-09-20 21:37:50 +02:00
sql tst_qvfssql: Don't use appless main 2023-08-11 15:45:36 +02:00
testlib tst_QAbstractItemModelTester: fix unittest 2023-09-08 19:17:36 +03:00
tools tst_qmakelib: compile with QT_NO_FOREACH 2023-08-19 19:17:17 +03:00
wasm CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
widgets QDockWidget: ignore close event if DockWidgetClosable is not set 2023-09-21 18:36:06 +02:00
xml CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
CMakeLists.txt CI: Enable some tests under corelib/thread for Wasm platform 2023-09-14 11:58:48 +02:00
network-settings.h QtNetworkSettings: narrow down hasIPv6 to specific OSes 2023-08-29 07:20:51 -07:00