summaryrefslogtreecommitdiffstats
path: root/config.tests/qws
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2022-05-24 17:20:15 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2022-05-27 22:27:13 +0200
commit31f98957cf5c061f868588ef81059a907c9d30ad (patch)
tree0d6487bbed38198b4f49ee4776473bd0f813a730 /config.tests/qws
parent9614f4d434474fe7dcca752b3f72a56f2d382230 (diff)
Add compile-time generation of JNI class names
As with method signatures, register class names using template function specialization in the QtJniTypes namespace, and then declare C++ types as JNI classes with a class name string. Such classes implicitly get registered as JNI types as well. Add a QJniObject construct method (since C++ constructors that are templates cannot be explicitly instantiated with a type), and a QJniEnvironment::findClass overload. Add test coverage, also for the recently added macros for native methods. As a drive-by, change the name of the Q_JNI_DECLARE_NATIVE_METHOD macro to Q_DECLARE_JNI_NATIVE_METHOD for consistency. Change-Id: Ic19562d78da726f202b3bdf4e9354e8ad24d8bd9 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Diffstat (limited to 'config.tests/qws')
0 files changed, 0 insertions, 0 deletions