qt6-bb10/src/corelib
Volker Hilsheimer 80d4d55e25 JNI: add QJniArray class for easier working with arrays
Implements an iterator API and other standard member access functions
for sequential containers so that we can use ranged-for over an object
that is a jarray. Provides read-only access to individual elements
(which is mostly relevant for arrays of objects), or the entire data()
as a contiguous memory block (which is useful for arrays of primitive
types).

QJniObject call functions can return QJniArray<T> when the return type
is either explicitly QJniArray<T> or T[], or their Qt equivalent (e.g.
a jbyteArray can be taken or returned as a QByteArray). If the return
type is a jarray type, then a QJniObject is returned as before.

Arrays can be created from a Qt container through a constructor or the
generic fromData named constructor in the QJniArrayBase class, which
implements the generic logic.

Not documented as public API yet.

Added a compile-time test to verify that types are mapped correctly.
The function test coverage is added to the QJniObject auto-test, as
that already provides the Java test class with functions taking and
returning arrays of different types.

Change-Id: I0750fc4f4cce7314df3b10e122eafbcfd68297b6
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-10-16 18:43:16 +02:00
..
animation QAbstractAnimation: avoid spurious dependencies on the state property 2023-09-18 18:24:37 +02:00
compat JNI: move private QJniObject helpers out of the public header 2023-09-27 19:44:58 +02:00
doc doc: improve property example slot 2023-10-14 20:19:56 +00:00
global qTzName: suppress warning that tzname is deprecated with UCRT 2023-10-15 18:36:04 -07:00
io QStorageInfo/Linux: include QDir::Hidden in the search for labels 2023-10-16 08:41:21 -07:00
ipc IPC: Move the legacy key to the QNativeIpcKey 2023-09-17 18:10:18 -07:00
itemmodels Doc: Fix warnings and linking issues 2023-10-09 17:24:07 +00:00
kernel JNI: add QJniArray class for easier working with arrays 2023-10-16 18:43:16 +02:00
mimetypes Doc: QtCore: Fix documentation issues 2023-10-02 21:10:59 +00:00
platform Introduce QComObject base class 2023-10-13 21:29:48 +02:00
plugin Doc: Fix warnings and linking issues 2023-10-09 17:24:07 +00:00
serialization Fix renamed and duplicated namespaces in QXmlStreamWriter 2023-09-20 17:16:29 +02:00
text Add missing | operator for QRegularExpression::WildcardConversionOptions 2023-10-16 18:43:16 +02:00
thread Include what you need: <QPointer> 2023-10-12 21:38:54 +02:00
time Sort out an anomaly in tst_QDateTime::springForward() 2023-10-11 22:06:20 +02:00
tools Doc: Add missing return type to QList/QVarLengthArray::assign 2023-10-13 14:12:27 +02:00
tracing Core: include mocs 2023-07-07 18:25:50 +02:00
CMakeLists.txt JNI: add QJniArray class for easier working with arrays 2023-10-16 18:43:16 +02:00
Qt6AndroidMacros.cmake Use the actual target name as base name for android deployment settings 2023-09-27 17:44:59 +00:00
Qt6CTestMacros.cmake Fix running CMake test projects in prefix builds 2023-08-19 11:03:36 +02:00
Qt6CoreConfigExtras.cmake.in CMake: Store info about the debug build in QtDeploySupport.cmake 2023-09-26 12:12:51 +02:00
Qt6CoreConfigureFileTemplate.in CMake: Fix unnecessary rebuilding upon reconfiguration 2020-10-30 17:19:27 +01:00
Qt6CoreDeploySupport.cmake CMake: Add NO_COMPILER_RUNTIME to deploy script macros 2023-03-13 16:31:31 -05:00
Qt6CoreMacros.cmake Revert "CMake: Update timestamp file for `Multi-Config` and `Cross-Config` builds" 2023-10-16 17:41:21 +02:00
Qt6CoreResourceInit.in.cpp CMake: Place resources into static libraries, not object libraries 2023-08-14 14:05:32 +02:00
Qt6WasmMacros.cmake wasm: add preload config for shared libraries build 2023-07-04 15:42:02 +02:00
QtCompressMimeDatabase.cmake Replace the scripting-based mime types compression mechanism with CMake 2022-12-01 02:23:51 +01:00
QtCore.dynlist Remove old pre-6.0 hooks 2021-10-22 19:12:07 -07:00
QtInstallPaths.cmake.in Move install paths from CoreConfigExtras.cmake to a separate file 2022-10-25 16:05:11 +02:00
configure.cmake Remove remnants of Qt for Native Client (NACL) 2023-09-23 13:40:44 +02:00
debug_script.py lldb: Look up Qt Creator version via Info.plist instead of mdls 2023-09-23 03:38:53 +02:00
qt_cmdline.cmake CMake: remove test for eventfd, replace with __has_include 2023-08-29 07:41:11 -07:00