qt6-bb10/tests/auto/corelib
Volker Hilsheimer d05438454f JNI: Add test coverage for a jobjectArray in a native function
Make sure this works as it should. The bug report/support request wants
to have a String[] parameter on the Java side, but then the C++ side can
not use jobjectArray (as that has "[Ljava/lang/Object;" as signature),
so use Object[] instead (which is one solution; the other is to use
QList<jstring> or (in 6.8) QStringList on the C++ side.

What's easy to miss is that the jobjectArray that we get is a local ref,
so we have to extend its lifetime by creating a QJniObject holding it as
a global reference. We can then create a QJniArray from that QJniObject
(without any type safety).

Task-number: QTBUG-128456
Change-Id: I1e03b811165f9bc5106324d39fb58114ee8cf398
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
(cherry picked from commit f9fd5870f7379103005839bc03543bb8f6da94c3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-02 18:10:38 +00:00
..
animation Change license for tests files 2024-02-04 09:56:42 +01:00
global Convert a Qt ordering type to the weaker std ordering type 2024-08-25 17:04:38 +00:00
io QDirListing: extend unit tests 2024-08-29 20:41:36 +00:00
ipc ipctestcommon.h: port away from qsnprintf() 2024-07-30 16:47:32 +00:00
itemmodels QIdentityProxyModel: add setHandleSourceDataChanges(bool) 2024-08-12 20:18:41 +00:00
kernel JNI: Add test coverage for a jobjectArray in a native function 2024-09-02 18:10:38 +00:00
mimetypes Update tika-mimetypes.xml from upstream 2024-08-29 04:16:36 +00:00
platform Android: Add Java QtAbstractItemModel auto test 2024-08-20 01:28:03 +00:00
plugin QLibrary/Unix: update the x86-64-v3 prefix path in our search 2024-07-11 08:27:24 +00:00
serialization Fix users of static max_size() 2024-08-31 08:56:31 +00:00
text String Views: add slice() methods 2024-08-28 17:40:05 +00:00
thread QThread/Unix: fix normal exit/terminate() race 2024-07-11 08:27:17 +00:00
time Rename new QTZ::aliasMatches to hasAlternativeName 2024-08-27 16:38:19 +00:00
tools QHash: adapt to C++20 ranges not offering operator->() 2024-08-20 01:28:02 +00:00
CMakeLists.txt