From 190c85b706ee80bc92d6419676dca0dbfa60587b Mon Sep 17 00:00:00 2001 From: Soheil Armin Date: Thu, 16 Jan 2025 11:26:36 +0200 Subject: [PATCH] Android: Fix incorrect JNI call from QAndroidItemModelProxy::sibling() The return type of the QtAbstractItemModel.sibling() method is a QtModelIndex Java type. The JNI call from QAndroidItemModelProxy::sibling() is using as return type of QJniObject::callMethod(). This will result in a non-matching JVM function signature. This change replaces jobject with JQtModelIndex as the QtJniType. Pick-to: 6.8 6.9 Fixes: QTBUG-132841 Change-Id: If157858f1ed49e25c8fbdfb9bb5c1fc2b7052826 Reviewed-by: Assam Boudjelthia --- src/corelib/platform/android/qandroiditemmodelproxy.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/platform/android/qandroiditemmodelproxy.cpp b/src/corelib/platform/android/qandroiditemmodelproxy.cpp index 72f79b9f717..1ad34baa85d 100644 --- a/src/corelib/platform/android/qandroiditemmodelproxy.cpp +++ b/src/corelib/platform/android/qandroiditemmodelproxy.cpp @@ -125,7 +125,7 @@ QModelIndex QAndroidItemModelProxy::sibling(int row, int column, const QModelInd { Q_ASSERT(jInstance.isValid()); const QMutexLocker lock = getMutexLocker(this); - return QAndroidModelIndexProxy::qInstance(jInstance.callMethod( + return QAndroidModelIndexProxy::qInstance(jInstance.callMethod( "sibling", row, column, QAndroidModelIndexProxy::jInstance(parent))); }