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> |
||
|---|---|---|
| .. | ||
| testdata/src/org/qtproject/qt/android/testdata | ||
| CMakeLists.txt | ||
| tst_qjniobject.cpp | ||